From e65437199ae3c2abb0467c14b2a3884be524b087 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 Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi (cherry picked from commit cd033bfc60f9700d0d52986a95da55a92c88ee01) Signed-off-by: Fridolin Somers --- 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.39.5