[Bug 25712] New: Add plugin hooks to transform patron and item barcodes
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 Bug ID: 25712 Summary: Add plugin hooks to transform patron and item barcodes Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Plugin architecture Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Some of our partners have unusual barcode requirements that have required us to transform scanned barcodes using javascript. This is not the most reliable method. It would make more sense to have Koha transform the barcodes on the backend using a plugin. We should add hooks to transform and generate new item and patron barcodes. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |24031 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24031 [Bug 24031] Add plugin hook after_hold_create -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 106577 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106577&action=edit Bug 25712: Add plugin hooks to transform patron and item barcodes Some of our partners have unusual barcode requirements that have required us to transform scanned barcodes using javascript. This is not the most reliable method. It would make more sense to have Koha transform the barcodes on the backend using a plugin. We should add hooks to transform and generate new item and patron barcodes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106577|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 106578 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106578&action=edit Bug 25712: Add plugin hooks to transform patron and item barcodes Some of our partners have unusual barcode requirements that have required us to transform scanned barcodes using javascript. This is not the most reliable method. It would make more sense to have Koha transform the barcodes on the backend using a plugin. We should add hooks to transform and generate new item and patron barcodes. 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) In the patron search and anywhere else you can scan a patron cardnumber, type in some cardnumbers but prefix them with A and postfix them with A or B, e.g. A12345A, A12345B 5) Note the letters are removed by Koha! 6) Try a cardnumber like X123456Y 7) Note Koha converts it to Z13456Z 8) Try an item barcode now with the same A A|B format from step 4 9) The item barcode should have the letters removed by Koha as well! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106578|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 106579 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106579&action=edit Bug 25712: Add plugin hooks to transform patron and item barcodes Some of our partners have unusual barcode requirements that have required us to transform scanned barcodes using javascript. This is not the most reliable method. It would make more sense to have Koha transform the barcodes on the backend using a plugin. We should add hooks to transform and generate new item and patron barcodes. 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) In the patron search and anywhere else you can scan a patron cardnumber, type in some cardnumbers but prefix them with A and postfix them with A or B, e.g. A12345A, A12345B 5) Note the letters are removed by Koha! 6) Try a cardnumber like X123456Y 7) Note Koha converts it to Z13456Z 8) Try an item barcode now with the same A A|B format from step 4 9) The item barcode should have the letters removed by Koha as well! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com Status|Needs Signoff |Patch doesn't apply --- Comment #4 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Patch doesn't apply. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Can you please update https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks too? Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106579|0 |1 is obsolete| | --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 107125 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107125&action=edit Bug 25712: Add plugin hooks to transform patron and item barcodes Some of our partners have unusual barcode requirements that have required us to transform scanned barcodes using javascript. This is not the most reliable method. It would make more sense to have Koha transform the barcodes on the backend using a plugin. We should add hooks to transform and generate new item and patron barcodes. 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) In the patron search and anywhere else you can scan a patron cardnumber, type in some cardnumbers but prefix them with A and postfix them with A or B, e.g. A12345A, A12345B 5) Note the letters are removed by Koha! 6) Try a cardnumber like X123456Y 7) Note Koha converts it to Z13456Z 8) Try an item barcode now with the same A A|B format from step 4 9) The item barcode should have the letters removed by Koha as well! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #7 from Lucas Gass <lucas@bywatersolutions.com> --- Works awesome! The QA tool raised a few issues: OK C4/Circulation.pm OK C4/ILSDI/Services.pm OK C4/Items.pm OK C4/SIP/Sip/MsgType.pm OK Koha/Item.pm OK Koha/Patron.pm OK Koha/Patron/Attribute.pm FAIL cataloguing/additem.pl FAIL valid Global symbol "$addedolditem" requires explicit package name (did you forget to declare "my $addedolditem"?) Global symbol "$addedolditem" requires explicit package name (did you forget to declare "my $addedolditem"?) OK circ/circulation.pl OK circ/returns.pl OK members/memberentry.pl OK offline_circ/process_koc.pl OK opac/sco/sco-main.pl OK t/db_dependent/Koha/Plugins/Plugins.t FAIL t/lib/Koha/Plugin/Test.pm FAIL critic # Variables::ProhibitUnusedVariables: Got 1 violation(s). FAIL tools/batchMod.pl FAIL valid Global symbol "$barcode" requires explicit package name (did you forget to declare "my $barcode"?) tools/batchMod.pl had compilation errors. OK tools/inventory.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 108831 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108831&action=edit Bug 25712: (QA follow-up) Fix QA script warnings -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Lucas Gass from comment #7)
FAIL cataloguing/additem.pl FAIL valid Global symbol "$addedolditem" requires explicit package name (did you forget to declare "my $addedolditem"?) Global symbol "$addedolditem" requires explicit package name (did you forget to declare "my $addedolditem"?)
Fixed!
FAIL t/lib/Koha/Plugin/Test.pm FAIL critic # Variables::ProhibitUnusedVariables: Got 1 violation(s).
This one's a false alarm and can be ignored.
FAIL tools/batchMod.pl FAIL valid Global symbol "$barcode" requires explicit package name (did you forget to declare "my $barcode"?) tools/batchMod.pl had compilation errors.
Fixed! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #107125|0 |1 is obsolete| | Attachment #108831|0 |1 is obsolete| | --- Comment #10 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 109051 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109051&action=edit Bug 25712: Add plugin hooks to transform patron and item barcodes Some of our partners have unusual barcode requirements that have required us to transform scanned barcodes using javascript. This is not the most reliable method. It would make more sense to have Koha transform the barcodes on the backend using a plugin. We should add hooks to transform and generate new item and patron barcodes. 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) In the patron search and anywhere else you can scan a patron cardnumber, type in some cardnumbers but prefix them with A and postfix them with A or B, e.g. A12345A, A12345B 5) Note the letters are removed by Koha! 6) Try a cardnumber like X123456Y 7) Note Koha converts it to Z13456Z 8) Try an item barcode now with the same A A|B format from step 4 9) The item barcode should have the letters removed by Koha as well! Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 --- Comment #11 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 109052 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109052&action=edit Bug 25712: (QA follow-up) Fix QA script warnings Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I feel like this might have been better as 2 patches - cardnumbers and item barcodes separately. It touches a lot of the code, including SIP2, offline circulation etc. With this patch applied, but without any plugin installed: 1) When a barcode is not found, there is no error message, but only a page reload. 2) A patron search with the correct cardnumber (42 for sample data) in the checkout tab no longer brings up the patron. I think maybe we need to check for a plugin installed? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |MOVED Status|Failed QA |RESOLVED --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Moved to bugs 26351 and 26352 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25712 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=26351 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org