From 4442ad353b2467495de921ebf991fb067cd403d9 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 21 Aug 2020 08:35:40 -0400 Subject: [PATCH] Bug 25712: (QA follow-up) Fix QA script warnings Signed-off-by: Lucas Gass --- cataloguing/additem.pl | 4 ++-- tools/batchMod.pl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 685c70b82c..b37409113f 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -505,11 +505,11 @@ if ($op eq "additem") { $record = _increment_barcode($record, $frameworkcode); } + my $addedolditem = TransformMarcToKoha( $record ); + my ( $new_barcode ) = Koha::Plugins->call( 'barcode_transform', 'item', $addedolditem->{'barcode'} ); $addedolditem->{'barcode'} = $new_barcode; - my $addedolditem = TransformMarcToKoha( $record ); - # If we have to add or add & duplicate, we add the item if ( $add_submit || $add_duplicate_submit ) { diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 28804389ac..91129684a7 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -366,7 +366,7 @@ if ($op eq "show"){ my @barcodelist = grep /\S/, ( split /[$split_chars]/, $list ); @barcodelist = uniq @barcodelist; - @barcodelist = map { ( Koha::Plugins->call( 'barcode_transform', 'item', $barcode ) )[0] } @barcodelist; + @barcodelist = map { ( Koha::Plugins->call( 'barcode_transform', 'item', $_ ) )[0] } @barcodelist; # Note: adding lc for case insensitivity my %itemdata = map { lc($_->{barcode}) => $_->{itemnumber} } @{ Koha::Items->search({ barcode => \@barcodelist }, { columns => [ 'itemnumber', 'barcode' ] } )->unblessed }; -- 2.11.0