[Koha-patches] [PATCH] Bug3916 : Batch Modify tool overwrites branches fields
Henri-Damien LAURENT
henridamien.laurent at biblibre.com
Wed Jun 23 18:15:49 CEST 2010
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
More information about the Koha-patches
mailing list