From c25e2b6ef83d2eee3bc5d6d714db61c044ca27bf Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Fri, 21 Jul 2023 15:25:00 +0000 Subject: [PATCH] Bug 34171: Use barcodedecode when attaching items to another record Bug 26351 added barcodecode that transforms scanned barcodes either by using itemBarcodeInputFilter or via a plugin to various pages in Koha, including checkout and checkin. But the feature for attaching items to a new record was missed. To test: * Add an item with barcode "ab" to any record * Set itemBarcodeInputFilter to "Remove spaces from" * Search for another record in the catalog * Edit > attach item > "a b" * The item is not found. * Apply patch, restart_all * Try again with "a b" * Verify that the item is found and attached to the record Signed-off-by: Michaela Sieber --- cataloguing/moveitem.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cataloguing/moveitem.pl b/cataloguing/moveitem.pl index ec59c258ff..03ca711694 100755 --- a/cataloguing/moveitem.pl +++ b/cataloguing/moveitem.pl @@ -23,6 +23,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); +use C4::Circulation qw( barcodedecode ); use C4::Output qw( output_html_with_http_headers ); use Koha::Biblios; @@ -34,7 +35,8 @@ my $query = CGI->new; my $biblionumber = $query->param('biblionumber'); # The barcode of the item to move -my $barcode = $query->param('barcode'); +my $barcode = barcodedecode($query->param('barcode')); + my ($template, $loggedinuser, $cookie) = get_template_and_user( { -- 2.30.2