Bugzilla – Attachment 140051 Details for
Bug 31482
Label creator does not call barcodedecode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31482: Label creator does not call barcodedecode
Bug-31482-Label-creator-does-not-call-barcodedecod.patch (text/plain), 2.16 KB, created by
Joonas Kylmälä
on 2022-09-01 14:50:22 UTC
(
hide
)
Description:
Bug 31482: Label creator does not call barcodedecode
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2022-09-01 14:50:22 UTC
Size:
2.16 KB
patch
obsolete
>From c19e000bf409be33ee4aa98c418bf3750f2e28d1 Mon Sep 17 00:00:00 2001 >From: Kyle Hall <kyle@bywatersolutions.com> >Date: Mon, 29 Aug 2022 09:26:44 -0400 >Subject: [PATCH] Bug 31482: Label creator does not call barcodedecode >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The label creator can accept a list of either itemnumbers or item barcodes. >In the case that the list of composed of barcodes, those barcodes should be >passed though barcodedecode before the lookup is performed. > >Test Plan: >1) Apply this patch >2) Download and install the Barcode Transformer plugin > https://github.com/bywatersolutions/koha-plugin-barcode-transformer/releases/ >3) Go to the plugin configuration page, set the configuration to the example configuration from the same page >4) On the "New label batch" page of the Label creator,, > type in some valid barcodes, but prefix them with X and postfix them with Y, e.g. X123456Y >5) Submit the form >6) Note the items are added to the label batch! > >JK: Remove unnecessary if $number check, barcodedecode already does this > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> >--- > labels/label-edit-batch.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/labels/label-edit-batch.pl b/labels/label-edit-batch.pl >index ac2da6392f..230291e3a4 100755 >--- a/labels/label-edit-batch.pl >+++ b/labels/label-edit-batch.pl >@@ -23,9 +23,10 @@ use Modern::Perl; > use CGI qw ( -utf8 ); > > use C4::Auth qw( get_template_and_user ); >-use C4::Output qw( output_html_with_http_headers ); >+use C4::Circulation qw( barcodedecode ); > use C4::Creators qw( get_label_summary html_table ); > use C4::Labels; >+use C4::Output qw( output_html_with_http_headers ); > > use Koha::Items; > >@@ -89,6 +90,7 @@ elsif ($op eq 'add') { > push @item_numbers, $number; > } > elsif ($number_type eq "barcode" ) { # we must test in case an invalid barcode is passed in; we effectively disgard them atm >+ $number = barcodedecode($number); > my $item = Koha::Items->find({barcode => $number}); > push @item_numbers, $item->itemnumber if $item; > } >-- >2.30.2
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 31482
:
139945
|
139946
|
139997
|
140036
|
140051
|
141114