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

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to