Bugzilla – Attachment 14960 Details for
Bug 9509
batchMod.pl does not ensure each barcode is unique
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9509 - batchMod.pl does not ensure each barcode is unique
Bug-9509---batchModpl-does-not-ensure-each-barcode.patch (text/plain), 1.31 KB, created by
Kyle M Hall (khall)
on 2013-01-30 17:47:19 UTC
(
hide
)
Description:
Bug 9509 - batchMod.pl does not ensure each barcode is unique
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-01-30 17:47:19 UTC
Size:
1.31 KB
patch
obsolete
>From ab2ba576bb25c292c77c2435d781683dba909f0d Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 30 Jan 2013 12:44:32 -0500 >Subject: [PATCH] Bug 9509 - batchMod.pl does not ensure each barcode is unique >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Test plan: >1) Browse to Tools ΓΆΒΊ Batch item deletion >2) Enter a list of barcodes, make sure you have at > least one barcode listed more than once >3) Click continue >4) Verify the duplicated barcode shows up multiple times in the table >5) Apply patch >6) Refresh the page >7) Verify each barcode now displays only once >--- > tools/batchMod.pl | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > >diff --git a/tools/batchMod.pl b/tools/batchMod.pl >index 2a87b88..e416d44 100755 >--- a/tools/batchMod.pl >+++ b/tools/batchMod.pl >@@ -34,6 +34,7 @@ use C4::ClassSource; > use C4::Dates; > use C4::Debug; > use MARC::File::XML; >+use List::MoreUtils qw/uniq/; > > my $input = new CGI; > my $dbh = C4::Context->dbh; >@@ -237,7 +238,7 @@ if ($op eq "show"){ > } > } > if ( my $list=$input->param('barcodelist')){ >- push my @barcodelist, split(/\s\n/, $list); >+ push my @barcodelist, uniq( split(/\s\n/, $list) ); > > foreach my $barcode (@barcodelist) { > >-- >1.7.2.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 9509
:
14960
|
15020
|
15049