[Koha-patches] [PATCH] [SIGNED-OFF] BZ6104: Modify item looses branch

Sophie Meynieux sophie.meynieux at biblibre.com
Thu Apr 7 11:42:59 CEST 2011


From: Paul Poulain <paul.poulain at biblibre.com>

If the $value is provided by the item, use it, don't use the librarian branch !

Signed-off-by: Sophie Meynieux <sophie.meynieux at biblibre.com>
---
 cataloguing/additem.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl
index b2b1192..e2dfc02 100755
--- a/cataloguing/additem.pl
+++ b/cataloguing/additem.pl
@@ -150,7 +150,7 @@ sub generate_subfield_form {
                 foreach my $thisbranch (@$branches) {
                     push @authorised_values, $thisbranch->{value};
                     $authorised_lib{$thisbranch->{value}} = $thisbranch->{branchname};
-                    $value = $thisbranch->{value} if $thisbranch->{selected};
+                    $value = $thisbranch->{value} if $thisbranch->{selected} && !$value;
                 }
             }
             elsif ( $subfieldlib->{authorised_value} eq "itemtypes" ) {
-- 
1.7.0.4



More information about the Koha-patches mailing list