Bugzilla – Attachment 174550 Details for
Bug 37326
Batch modification should decode barcodes when using a barcode file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37326: decode barcode file in inventory tool
Bug-37326-decode-barcode-file-in-inventory-tool.patch (text/plain), 2.27 KB, created by
Marcel de Rooy
on 2024-11-15 09:36:58 UTC
(
hide
)
Description:
Bug 37326: decode barcode file in inventory tool
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-11-15 09:36:58 UTC
Size:
2.27 KB
patch
obsolete
>From d47007103b307e74e4373dac0320b9049dca6dd4 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 11 Jul 2024 12:03:40 +0000 >Subject: [PATCH] Bug 37326: decode barcode file in inventory tool >Content-Type: text/plain; charset=utf-8 > >This patch ensures that barcodes uploaded as a file into batchMod are run through >any transformations to match the behaviour of barcodes entered in a list > >To test: >1 - Edit BarcodeSeparators system preference to remove \s >2 - Install barcode transformer plugin: > https://github.com/bywatersolutions/koha-plugin-barcode-transformer/releases/tag/v1.2.0 >3 - Configure the plguin: >item: > - > match: "^[A-Z]* \| " > search: "^[A-Z]* \| " > replace: "" > - > match: " \| .*$" > search: " \| .*$" > replace: "" >4 - Go to Cataloging->Batch item modification >5 - Enter a list of barcodes into the 'Scan one by one' box like: >ERR | 12345 | ERR >FOO | 23456 | FOO >BAR | 34567 | BAR >6 - Click 'Continue' >7 - Note the barcodes not found are: >12345 >23456 >34567 >8 - Save the barcodes with extra text into a file >9 - Perform batch mod, supplying the barcodes via the file >10 - Note the barcodes not found are the original strings >11 - Apply patch, restart all >12 - Perform batch modification using file again >13 - Note the not found barcodes are the transformed version >14 - Sign off! > >Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > tools/batchMod.pl | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/tools/batchMod.pl b/tools/batchMod.pl >index 1b43231857..d6367b48a1 100755 >--- a/tools/batchMod.pl >+++ b/tools/batchMod.pl >@@ -223,6 +223,7 @@ if ($op eq "cud-show" || $op eq "show"){ > if ($filecontent eq 'barcode_file') { > @contentlist = grep /\S/, ( map { split /[$split_chars]/ } @contentlist ); > @contentlist = uniq @contentlist; >+ @contentlist = map { barcodedecode($_) } @contentlist; > # Note: adding lc for case insensitivity > my %itemdata = map { lc($_->{barcode}) => $_->{itemnumber} } @{ Koha::Items->search({ barcode => { -in => \@contentlist } }, { columns => [ 'itemnumber', 'barcode' ] } )->unblessed }; > @itemnumbers = map { exists $itemdata{lc $_} ? $itemdata{lc $_} : () } @contentlist; >-- >2.39.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 37326
:
168796
|
171393
| 174550