[Koha-patches] [PATCH] Bug 3713 Don't ignore existing value in branch values
Colin Campbell
colin.campbell at ptfs-europe.com
Thu Oct 15 13:24:18 CEST 2009
When editing items the user library rather than the
existing value was being set as the default value in
branch fields of the item
---
cataloguing/additem.pl | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl
index e25bb44..4e2d312 100755
--- a/cataloguing/additem.pl
+++ b/cataloguing/additem.pl
@@ -417,7 +417,9 @@ 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};
+ if (!$value && $thisbranch->{selected}) {
+ $value = $thisbranch->{value};
+ }
}
}
elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) {
--
1.6.2.5
More information about the Koha-patches
mailing list