bug 3916: set another "no change" dropdwon in batch item modification
authorGalen Charlton <gmcharlt@gmail.com>
Fri, 2 Jul 2010 18:38:28 +0000 (14:38 -0400)
committerGalen Charlton <gmcharlt@gmail.com>
Fri, 2 Jul 2010 18:38:28 +0000 (14:38 -0400)
Item type drop-down in the batch item modification tool
now has its default value set to the 'no change' value.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
tools/batchMod.pl

index 3580b91..f5138d1 100755 (executable)
@@ -284,13 +284,14 @@ foreach my $tag (sort keys %{$tagslib}) {
         $value = "";
        }
        elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) {
-           push @authorised_values, "" unless ( $tagslib->{$tag}->{$subfield}->{mandatory} );
+           push @authorised_values, "";
            my $sth = $dbh->prepare("select itemtype,description from itemtypes order by description");
            $sth->execute;
            while ( my ( $itemtype, $description ) = $sth->fetchrow_array ) {
                push @authorised_values, $itemtype;
                $authorised_lib{$itemtype} = $description;
            }
+        $value = "";
 
           #---- class_sources
       }