Bug 9509 - batchMod.pl does not ensure each barcode is unique

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

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
verified bug and fix - both good.

Nice test plan, thanks!

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This commit is contained in:
Kyle M Hall 2013-01-30 12:44:32 -05:00 committed by Chris Cormack
parent 401ae9557a
commit ec79cbfc12
1 changed files with 2 additions and 1 deletions

View File

@ -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) {