From ba102318cbaffbee3cbea7681a605c2d9203e5db Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 27 Mar 2012 12:01:33 -0400 Subject: [PATCH] Bug 7485 - Cannot edit barcode on Fast Add Simple fix, a special case was added for the fast add framework in the case that an item was being checked out that had not been catalogued. In that case, the barcode was being passed as a parameter through addbiblio.pl to additem.pl. This barcode param was used to overwrite the existing value, so if no barcode param was passed ( which is only the case with fast adds from the circ screen ), the barcode field would appear empty in the items editor. This commit causes that special case code to check for an existing barcode value first, and only use the cgi parameter 'branch' in the case that there is no existing barcode value. --- cataloguing/additem.pl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 91dc9e7..60b7b9b 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -147,7 +147,7 @@ sub generate_subfield_form { } } - if ($frameworkcode eq 'FA' && $subfieldlib->{kohafield} eq 'items.barcode'){ + if ($frameworkcode eq 'FA' && $subfieldlib->{kohafield} eq 'items.barcode' && !$value){ my $input = new CGI; $value = $input->param('barcode'); } @@ -251,7 +251,7 @@ sub generate_subfield_form { ... $javascript]; } else { - warn "Plugin Failed: $plugin"; + warn; "Plugin Failed: $plugin"; $subfield_data{marc_value} = ""; # supply default input form } } -- 1.7.2.5