Bugzilla – Attachment 90237 Details for
Bug 23006
Can't use inventory tool with barcodes that contain regex reserved characters ($,...)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23006: Cannot use inventory with barcodes containing special chars
Bug-23006-Cannot-use-inventory-with-barcodes-conta.patch (text/plain), 1.46 KB, created by
Jonathan Druart
on 2019-05-31 17:00:03 UTC
(
hide
)
Description:
Bug 23006: Cannot use inventory with barcodes containing special chars
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-05-31 17:00:03 UTC
Size:
1.46 KB
patch
obsolete
>From 8f0f9964a5f9e61882bac70535b13ec96f0ea503 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 29 May 2019 13:46:15 +0000 >Subject: [PATCH] Bug 23006: Cannot use inventory with barcodes containing > special chars > >If a barcode contains special characters like $, the regex in inventory >does no longer work. >This fix (as suggested by Jonathan) replaces the regex by a eq compare. > >Test plan: >Pick one barcode and add a $ somewhere in the middle, say 123$456. >Include this barcode in a barcode file for inventory. >Run inventory on that file and verify that barcode was read and datelastseen >was updated. The barcode should not be reported as missing (not scanned). > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > tools/inventory.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/tools/inventory.pl b/tools/inventory.pl >index 96a6bdf5ca..934f121f90 100755 >--- a/tools/inventory.pl >+++ b/tools/inventory.pl >@@ -328,7 +328,7 @@ if ( $compareinv2barcd ) { > my $barcode = $item->{barcode}; > if( !$barcode ) { > $item->{problems}->{no_barcode} = 1; >- } elsif ( grep /^$barcode$/, @scanned_barcodes ) { >+ } elsif ( grep { $_ eq $barcode } @scanned_barcodes ) { > next; > } else { > $item->{problems}->{not_scanned} = 1; >-- >2.11.0
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 23006
:
90188
|
90217
| 90237