Bugzilla – Attachment 90188 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.37 KB, created by
Marcel de Rooy
on 2019-05-29 14:12:25 UTC
(
hide
)
Description:
Bug 23006: Cannot use inventory with barcodes containing special chars
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2019-05-29 14:12:25 UTC
Size:
1.37 KB
patch
obsolete
>From 3ea7162d646338ce40eaa1163a26d335c33a9dd1 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 >Content-Type: text/plain; charset=utf-8 > >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> >--- > 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