Bugzilla – Attachment 70535 Details for
Bug 19585
Inventory: Allow additional separators in a barcode file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19585: Inventory: Allow additional separators in a barcode file
Bug-19585-Inventory-Allow-additional-separators-in.patch (text/plain), 1.46 KB, created by
jwayway
on 2018-01-16 02:11:35 UTC
(
hide
)
Description:
Bug 19585: Inventory: Allow additional separators in a barcode file
Filename:
MIME Type:
Creator:
jwayway
Created:
2018-01-16 02:11:35 UTC
Size:
1.46 KB
patch
obsolete
>From fc63527f690af601b4f9960ad299c345106632e8 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 2 Nov 2017 10:55:42 +0100 >Subject: [PATCH] Bug 19585: Inventory: Allow additional separators in a > barcode file > >This patch makes \n, \r, |, comma, semicolon and hyphen ('-') all valid >separators between barcodes passed to inventory. >An additional grep removes empty barcodes. (Note: The grep looks for at >least one non-whitespace character. We could be more specific, but this >allows for more flexibility like testing with alphanumeric barcodes etc.) > >Test plan: >Upload a barcode file that contains various allowed separators. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Jenny Way <jwayway@hotmail.com> >--- > tools/inventory.pl | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > >diff --git a/tools/inventory.pl b/tools/inventory.pl >index 8df02ab..dd67e4d 100755 >--- a/tools/inventory.pl >+++ b/tools/inventory.pl >@@ -154,10 +154,7 @@ if ( $uploadbarcodes && length($uploadbarcodes) > 0 ) { > my $lines_read=0; > binmode($uploadbarcodes, ":encoding(UTF-8)"); > while (my $barcode=<$uploadbarcodes>) { >- $barcode =~ s/\r/\n/g; >- $barcode =~ s/\n\n/\n/g; >- my @data = split(/\n/,$barcode); >- push @uploadedbarcodes, @data; >+ push @uploadedbarcodes, grep { /\S/ } split( /[\n\r,;|-]/, $barcode ); > } > for my $barcode (@uploadedbarcodes) { > next unless $barcode; >-- >2.1.4
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 19585
:
69116
|
69117
|
69118
|
69154
|
70535
|
70625