From f7d9ebbff3ab9b620b0c0b80b3dc28c51753ec13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9rick=20Capovilla?= Date: Fri, 1 Apr 2011 12:23:12 +0200 Subject: [PATCH] Bug 3727: Corrects the behaviour of the itemtype selectbox in addbiblio.pl If the subfield is set as mandatory with an empty default value, an empty value is added in the selectbox and this value is selected by default. Before, the first element was automatically selected, so it was easy to forget to set this mandatory value. Signed-off-by: Julian Maurice Signed-off-by: Chris Cormack --- cataloguing/addbiblio.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index cd5691e3c7..60f8e15dde 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -189,7 +189,7 @@ sub build_authorized_values_list ($$$$$$$) { "select itemtype,description from itemtypes order by description"); $sth->execute; push @authorised_values, "" - unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); + unless ( $tagslib->{$tag}->{$subfield}->{defaultvalue} and $tagslib->{$tag}->{$subfield}->{mandatory} ); my $itemtype;