Bugzilla – Attachment 184263 Details for
Bug 31930
Ignore whitespace before and after barcodes when adding items to rotating collections
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31930: Ignore whitespace before and after barcodes
Bug-31930-Ignore-whitespace-before-and-after-barco.patch (text/plain), 1.81 KB, created by
Yvonne Waterman
on 2025-07-17 23:49:16 UTC
(
hide
)
Description:
Bug 31930: Ignore whitespace before and after barcodes
Filename:
MIME Type:
Creator:
Yvonne Waterman
Created:
2025-07-17 23:49:16 UTC
Size:
1.81 KB
patch
obsolete
>From 209f598cef83ce3a117d03a5bcdf71f1201f935b Mon Sep 17 00:00:00 2001 >From: Yvonne Waterman <yvonnewaterman@ctalyst.net.nz> >Date: Thu, 17 Jul 2025 23:42:31 +0000 >Subject: [PATCH] Bug 31930: Ignore whitespace before and after barcodes > >Decoded the barcode in add items to collection. > >Test plan: >1. Go to Tools -> Rotating collections >2. Create a rotating collection >3. Chose Actions -> Manage items >4. Paste a barcode and put some spaces around it, for example " 39999000010053 " >5. Click Submit => Shown an error, no item with matching barcode found, though the barcode is printed without all the whitespace >6. Apply patch >7. Repeat steps 1 - 5, barcode should be accepted >--- > rotating_collections/addItems.pl | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/rotating_collections/addItems.pl b/rotating_collections/addItems.pl >index ef9c5eb744..4f86c1de51 100755 >--- a/rotating_collections/addItems.pl >+++ b/rotating_collections/addItems.pl >@@ -18,8 +18,9 @@ > > use Modern::Perl; > >-use C4::Output qw( output_html_with_http_headers ); >-use C4::Auth qw( get_template_and_user ); >+use C4::Output qw( output_html_with_http_headers ); >+use C4::Auth qw( get_template_and_user ); >+use C4::Circulation qw( barcodedecode ); > use C4::Context; > use C4::RotatingCollections; > >@@ -42,8 +43,9 @@ if ( defined $op > and $op eq 'cud-add' ) > { > ## Add the given item to the collection >- my $colId = $query->param('colId'); >- my $barcode = $query->param('barcode'); >+ my $colId = $query->param('colId'); >+ my $barcode = $query->param('barcode'); >+ $barcode = barcodedecode($barcode); > my $removeItem = $query->param('removeItem'); > my $item = Koha::Items->find( { barcode => $barcode } ); > my $itemnumber = $item ? $item->itemnumber : undef; >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31930
:
184263
|
184264
|
184274
|
184647