From a4dab23a41fe63855806a5c95d6bf08d23556aa0 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Wed, 23 Jun 2010 18:15:49 +0200 Subject: [PATCH] Bug3916 : Batch Modify tool overwrites branches fields This was owed to the Item modification construction and the change in GetBranchesLoop behaviour which selects the user branch by default. Adding a void branch selected Changing default value to "" Signed-off-by: Galen Charlton --- tools/batchMod.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 310624fde6..abeaf15740 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -226,8 +226,8 @@ my $authorised_values_sth = $dbh->prepare("SELECT authorised_value,lib FROM auth my $branches = GetBranchesLoop(); # build once ahead of time, instead of multiple times later. # Adding a default choice, in case the user does not want to modify the branch -my @nochange_branch = { branchname => '', value => '', selected => 1 }; -unshift (@$branches, @nochange_branch); +my $nochange_branch = { branchname => '', value => '', selected => 1 }; +unshift (@$branches, $nochange_branch); my $pref_itemcallnumber = C4::Context->preference('itemcallnumber'); @@ -280,8 +280,8 @@ foreach my $tag (sort keys %{$tagslib}) { foreach my $thisbranch (@$branches) { push @authorised_values, $thisbranch->{value}; $authorised_lib{$thisbranch->{value}} = $thisbranch->{branchname}; - $value = $thisbranch->{value} if $thisbranch->{selected}; } + $value = ""; } elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) { push @authorised_values, "" unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); -- 2.39.5