From b940858d4144dc8b1a54707cb09415cd6a9fd0f9 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Wed, 23 Jun 2010 18:15:08 +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 "" --- tools/batchMod.pl | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 310624f..abeaf15 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} ); -- 1.7.0.4