Summary: | Label creator does not call barcodedecode | ||
---|---|---|---|
Product: | Koha | Reporter: | Kyle M Hall (khall) <kyle> |
Component: | Tools | Assignee: | Kyle M Hall (khall) <kyle> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | P5 - low | CC: | arthur.suzuki, joonas.kylmala, lucas, m.de.rooy, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
22.11.00, 22.05.07, 21.11.14
|
|
Circulation function: | |||
Bug Depends on: | 26351 | ||
Bug Blocks: | |||
Attachments: |
Bug 31482i: Label creator does not call item_barcode_transform plugin hook
Bug 31482: Label creator does not call item_barcode_transform plugin hook Bug 31482: Label creator does not call item_barcode_transform plugin hook Bug 31482: Label creator does not call barcodedecode Bug 31482: Label creator does not call barcodedecode Bug 31482: Label creator does not call barcodedecode |
Description
Kyle M Hall (khall)
2022-08-29 13:26:23 UTC
Created attachment 139945 [details] [review] Bug 31482i: Label creator does not call item_barcode_transform plugin hook 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 the item_barcode_transform plugin hook 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! Created attachment 139946 [details] [review] Bug 31482: Label creator does not call item_barcode_transform plugin hook 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 the item_barcode_transform plugin hook 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! Shouldn't this actually be a call to C4::Circulation::barcodedecode ? (In reply to Joonas Kylmälä from comment #3) > Shouldn't this actually be a call to C4::Circulation::barcodedecode ? Good thinking! I'll post an updated patch asap. Created attachment 139997 [details] [review] Bug 31482: Label creator does not call item_barcode_transform plugin hook 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 the item_barcode_transform plugin hook 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! Need to move the barcodedecode call straight into Koha::Items->find(), it's not taking a reference but rather returning the decoded barcode. Please update the patch description too Created attachment 140036 [details] [review] Bug 31482: Label creator does not call barcodedecode 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! Created attachment 140051 [details] [review] Bug 31482: Label creator does not call barcodedecode 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> Fixed up the patch a little bit, removed "if $number" from the end as that was causing a bug with 0 barcodes and barcodedecode does it already. Signing off. Created attachment 141114 [details] [review] Bug 31482: Label creator does not call barcodedecode 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> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Pushed to master for 22.11. Nice work everyone, thanks! Backported to 22.05.x for upcoming 22.05.07 release applied to 21.11 for 21.11.14 Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document it seems, marking resolved. |