Bugzilla – Attachment 94354 Details for
Bug 23800
Batch modification tool orders items by barcode incremental by default (regression to 17.11)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23800: fix regression in batch item modification tool
Bug-23800-fix-regression-in-batch-item-modificatio.patch (text/plain), 1.70 KB, created by
Arthur Suzuki
on 2019-10-16 19:01:17 UTC
(
hide
)
Description:
Bug 23800: fix regression in batch item modification tool
Filename:
MIME Type:
Creator:
Arthur Suzuki
Created:
2019-10-16 19:01:17 UTC
Size:
1.70 KB
patch
obsolete
>From 398be4af739aaf06fbbdeb8f4adfa9a829b8ee3b Mon Sep 17 00:00:00 2001 >From: Arthur Suzuki <arthur.suzuki@biblibre.com> >Date: Fri, 11 Oct 2019 23:42:25 +0200 >Subject: [PATCH] Bug 23800: fix regression in batch item modification tool > >Test plan : >1/ scan several items in the Tools / Batch Item Modification >2/ click continue >3/ check that items were not displayed in the order they appeared in >4/ apply patch >5/ repeat step 1 and 2 >6/ verify that items now appear in the order they were scanned >--- > tools/batchMod.pl | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > >diff --git a/tools/batchMod.pl b/tools/batchMod.pl >index 2e6473784c..98cbc757a1 100755 >--- a/tools/batchMod.pl >+++ b/tools/batchMod.pl >@@ -282,9 +282,15 @@ if ($op eq "show"){ > my @barcodelist = grep /\S/, ( split /[$split_chars]/, $list ); > @barcodelist = uniq @barcodelist; > >- my $existing_items = Koha::Items->search({ barcode => \@barcodelist }); >- @itemnumbers = $existing_items->get_column('itemnumber'); >- my @barcodes = $existing_items->get_column('barcode'); >+ my $order = "field(" . join(",","barcode",@barcodelist) . ")"; >+ my $existing_items = Koha::Items->search({ barcode => \@barcodelist }, >+ { order_by => \[$order] } )->unblessed; >+ >+ my @barcodes; >+ foreach my $itm (@$existing_items) { >+ push @itemnumbers, $itm->{'itemnumber'}; >+ push @barcodes, $itm->{'barcode'}; >+ } > my %exists = map {lc($_)=>1} @barcodes; > # to avoid problems with case sensitivity > foreach my $barcode (@barcodelist) { >-- >2.20.1
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 23800
:
93987
|
94032
|
94033
|
94034
|
94353
|
94354
|
95252
|
95659
|
96241
|
96242
|
96243