[Bug 26351] New: Add plugin hooks to transform item barcodes
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Bug ID: 26351 Summary: Add plugin hooks to transform 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 Moved from bug 25712 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 the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 109532 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109532&action=edit Bug 26351: Add plugin hooks to transform 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 item barcode field on the checkin and checkout pages, and anywhere else you can scan an item barcode, type in some valid barcodes, but prefix them with X and postfix them with Y, e.g. X123456Y 5) Note the letters are removed by Koha! Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- 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=26351 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 watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 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=26351 Kyle M Hall <kyle@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=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |26352 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26352 [Bug 26352] Add plugin hooks to transform patron barcodes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #109532|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 109548 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109548&action=edit Bug 26351: Add plugin hooks to transform 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 item barcode field on the checkin and checkout pages, and anywhere else you can scan an item barcode, type in some valid barcodes, but prefix them with X and postfix them with Y, e.g. X123456Y 5) Note the letters are removed by Koha! 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=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=25712 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Lacking the time to test deeply here tonight, but there is a small fail on the QA tools: FAIL t/lib/Koha/Plugin/Test.pm FAIL critic # Variables::ProhibitUnusedVariables: Got 1 violation(s). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 109671 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109671&action=edit Bug 26351: (QA follow-up) Fix QA script issue * Fixes issue with barcode generate stub so perlcritic is happy * Removes extra semicolon from return call in configure method -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #5 from Julian Maurice <julian.maurice@biblibre.com> --- I would like to make a suggestion about the hook name: IMO hooks should be named after an event (what just happened in Koha) rather than what the plugin is supposed to do. From what I understood this hook will be called every time a barcode is scanned. A plugin can choose to do other things than transforming the barcode (log it somewhere, transmit it to an external webservice, ...), so it would be more generic to call it "barcode_scanned" or something like that. Also, I took a quick look at the code and I have a concern: what will happen if two (or more) plugins implement this hook ? It looks like only the return value from the first plugin will be used. We can imagine one want to implement item barcode transform in one plugin and patron barcode transform in another. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Julian Maurice from comment #5)
I would like to make a suggestion about the hook name: IMO hooks should be named after an event (what just happened in Koha) rather than what the plugin is supposed to do. From what I understood this hook will be called every time a barcode is scanned. A plugin can choose to do other things than transforming the barcode (log it somewhere, transmit it to an external webservice, ...), so it would be more generic to call it "barcode_scanned" or something like that.
I'm happy to change that!
Also, I took a quick look at the code and I have a concern: what will happen if two (or more) plugins implement this hook ? It looks like only the return value from the first plugin will be used. We can imagine one want to implement item barcode transform in one plugin and patron barcode transform in another.
In it's current state, the last plugin 'wins'. A couple solutions would be to: A) Modify call() to feed the result of the last plugin call into the next one B) Split the hooks into separate methods I'm much more inclined to go with B. What do you think Julian? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Kyle M Hall from comment #6)
In it's current state, the last plugin 'wins'. A couple solutions would be to: A) Modify call() to feed the result of the last plugin call into the next one B) Split the hooks into separate methods
I'm much more inclined to go with B. What do you think Julian?
I think A would not work in all cases. There can be more than one parameter and it's not necessarily the same thing as the return value. B would work in the example I mentioned, but would not work in other cases, like two plugins implementing the same method, one for transforming, the other for doing something else. I've seen a pattern somewhere else that could work : plugins modify directly the parameters my $params = { barcode => $barcode }; Koha::Plugins->call($hook_name, $params); $barcode = $params->{barcode}; It's not very intuitive, but it should work as expected in all cases, and there's no need to modify Koha::Plugins->call. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Failed QA --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I don't see a test that confirms the hook into Koha::Item works.. there's prior art for such tests I believe. Failing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 110844 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110844&action=edit Bug 26351: Add unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110844|0 |1 is obsolete| | --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 110846 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110846&action=edit Bug 26351: Add unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Patch on longer applies - please rebase! Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 26351: Add plugin hooks to transform item barcodes Using index info to reconstruct a base tree... M C4/Circulation.pm M C4/Items.pm M Koha/Item.pm M cataloguing/additem.pl M circ/circulation.pl M circ/returns.pl M offline_circ/process_koc.pl M opac/sco/sco-main.pl M t/lib/Koha/Plugin/Test.pm M tools/batchMod.pl M tools/inventory.pl Falling back to patching base and 3-way merge... Auto-merging tools/inventory.pl Auto-merging tools/batchMod.pl CONFLICT (content): Merge conflict in tools/batchMod.pl Auto-merging t/lib/Koha/Plugin/Test.pm Auto-merging opac/sco/sco-main.pl Auto-merging offline_circ/process_koc.pl Auto-merging circ/returns.pl Auto-merging circ/circulation.pl Auto-merging cataloguing/additem.pl CONFLICT (content): Merge conflict in cataloguing/additem.pl Auto-merging Koha/Item.pm CONFLICT (content): Merge conflict in Koha/Item.pm Auto-merging C4/Items.pm Auto-merging C4/Circulation.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 26351: Add plugin hooks to transform item barcodes The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-26351-Add-plugin-hooks-to-transform-item-barco-ho0gdo.patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #109548|0 |1 is obsolete| | Attachment #109671|0 |1 is obsolete| | Attachment #110846|0 |1 is obsolete| | --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 111575 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111575&action=edit Bug 26351: Add plugin hooks to transform 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 item barcode field on the checkin and checkout pages, and anywhere else you can scan an item barcode, type in some valid barcodes, but prefix them with X and postfix them with Y, e.g. X123456Y 5) Note the letters are removed by Koha! 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=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111575|0 |1 is obsolete| | --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 111577 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111577&action=edit Bug 26351: Add plugin hooks to transform 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 item barcode field on the checkin and checkout pages, and anywhere else you can scan an item barcode, type in some valid barcodes, but prefix them with X and postfix them with Y, e.g. X123456Y 5) Note the letters are removed by Koha! 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=26351 --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 111578 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111578&action=edit Bug 26351: (QA follow-up) Fix QA script issue * Fixes issue with barcode generate stub so perlcritic is happy * Removes extra semicolon from return call in configure method -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #15 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 111579 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111579&action=edit Bug 26351: Add unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Sorry Kyle.... * I see a test for barcode_generate, but don't see any code related to this in the rest of the patchset.. does this belong in a different bug? * You're a tad inconsistent with when you call 'barcode_transform'.. sometimes it's prior to a call to 'barcodedecode', sometimes it's just after.. I imagine that it should be just after (and only actually called if 'barcodedecode' is not run (as barcodedecode runs it internally already). * Finally, I wonder about the name of the method 'barcode_transform'.. it made sense prior to splitting the bug in two.. but perhaps it would be clearer/easier for plugin developers to have a different name for the two options.. item_barcode_transform and patron_barcode_transfer perhaps?. I'm continuing with testing, but feedback on the above would be great. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- If you were to change that one, maybe patron_cardnumber_transfer? With chip cards and the likes that might be more accurate and stay close to our db name. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #18 from Kyle M Hall <kyle@bywatersolutions.com> ---
* I see a test for barcode_generate, but don't see any code related to this in the rest of the patchset.. does this belong in a different bug?
Yes, it is only used in Bug 26352.
* You're a tad inconsistent with when you call 'barcode_transform'.. sometimes it's prior to a call to 'barcodedecode', sometimes it's just after.. I imagine that it should be just after (and only actually called if 'barcodedecode' is not run (as barcodedecode runs it internally already).
Would it make more sense to replace all the calls *with* calls to barcodedecode? If feels incorrect for barcodedecode to be used inconsistently.
* Finally, I wonder about the name of the method 'barcode_transform'.. it made sense prior to splitting the bug in two.. but perhaps it would be clearer/easier for plugin developers to have a different name for the two options.. item_barcode_transform and patron_barcode_transfer perhaps?.
That is fine by me! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #19 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 111862 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111862&action=edit Bug 26351: (QA follow-up) Remove unused method barcode_transform -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #20 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 111863 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111863&action=edit Bug 26351: (QA follow-up) Rename barcode_transform to item_barcode_transform -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #21 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 111894 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111894&action=edit Bug 26351: (QA follow-up) Barcodes inputted into Koha should always pass though barcodedecode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111577|0 |1 is obsolete| | --- Comment #22 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 111916 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111916&action=edit Bug 26351: Add plugin hooks to transform 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 item barcode field on the checkin and checkout pages, and anywhere else you can scan an item barcode, type in some valid barcodes, but prefix them with X and postfix them with Y, e.g. X123456Y 5) Note the letters are removed by Koha! Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111578|0 |1 is obsolete| | --- Comment #23 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 111917 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111917&action=edit Bug 26351: (QA follow-up) Fix QA script issue * Fixes issue with barcode generate stub so perlcritic is happy * Removes extra semicolon from return call in configure method Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111579|0 |1 is obsolete| | --- Comment #24 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 111918 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111918&action=edit Bug 26351: Add unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111862|0 |1 is obsolete| | --- Comment #25 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 111919 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111919&action=edit Bug 26351: (QA follow-up) Remove unused method barcode_transform Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111863|0 |1 is obsolete| | --- Comment #26 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 111920 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111920&action=edit Bug 26351: (QA follow-up) Rename barcode_transform to item_barcode_transform Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111894|0 |1 is obsolete| | --- Comment #27 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 111921 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111921&action=edit Bug 26351: (QA follow-up) Barcodes inputted into Koha should always pass though barcodedecode Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #28 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 111922 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111922&action=edit Bug 26351: (QA follow-up) Catch one last case of itemBarcodeInputFilter Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #29 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- All works well here, and it's great to see a little general cleanup at the end, thanks Kyle. QA scripts are happy, no regressions found and Circulation tests all passing. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #30 from Kyle M Hall <kyle@bywatersolutions.com> --- RM Note: I will need to update the plugins I've written take account for the changes in this bug series. I will do that once this bug has been pushed and bug 26342 has passed qa! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Passed QA |Failed QA --- Comment #31 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Please 1. rebase, 2. adjust author of 4th patch and 3. fix the failure on Checkouts.t t/db_dependent/Koha/Checkouts.t .. Use of inherited AUTOLOAD for non-method Koha::Item::barcodedecode() is no longer allowed at /kohadevbox/koha/Koha/Item.pm line 92. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111916|0 |1 is obsolete| | Attachment #111917|0 |1 is obsolete| | Attachment #111918|0 |1 is obsolete| | Attachment #111919|0 |1 is obsolete| | Attachment #111920|0 |1 is obsolete| | Attachment #111921|0 |1 is obsolete| | Attachment #111922|0 |1 is obsolete| | --- Comment #32 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 113571 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113571&action=edit Bug 26351: Add plugin hooks to transform 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 item barcode field on the checkin and checkout pages, and anywhere else you can scan an item barcode, type in some valid barcodes, but prefix them with X and postfix them with Y, e.g. X123456Y 5) Note the letters are removed by Koha! Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #33 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 113572 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113572&action=edit Bug 26351: (QA follow-up) Fix QA script issue * Fixes issue with barcode generate stub so perlcritic is happy * Removes extra semicolon from return call in configure method Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #34 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 113573 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113573&action=edit Bug 26351: Add unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #35 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 113574 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113574&action=edit Bug 26351: (QA follow-up) Remove unused method barcode_transform Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #36 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 113575 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113575&action=edit Bug 26351: (QA follow-up) Rename barcode_transform to item_barcode_transform Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #37 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 113576 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113576&action=edit Bug 26351: (QA follow-up) Barcodes inputted into Koha should always pass though barcodedecode Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #38 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 113577 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113577&action=edit Bug 26351: (QA follow-up) Catch one last case of itemBarcodeInputFilter Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #39 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 113578 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113578&action=edit Bug 26351: (QA follow-up) Fix Checkouts.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #40 from Fridolin Somers <fridolin.somers@biblibre.com> --- I update the doc in https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement adds a release notes| |plugin hook to transform | |item barcodes scanned in to | |Koha. For example, if you | |need to alter your scanned | |item barcodes, but your | |scanners cannot be | |programmed to do so, a | |plugin could be written to | |handle that change in Koha | |instead. One example would | |be to drop the first and | |last characters of the | |scanned barcode, which may | |be check digits rather than | |part of the barcode itself. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #41 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Hum, there is something wrong here. Plugin has: sub item_barcode_transform { my ( $self, $barcode ) = @_; $barcode =~ s|0|X|g; return $barcode; } Checkout "0101" I get "Barcode not found The barcode was not found: 1" I am expecting "Barcode not found The barcode was not found: X1X1" It would be nice to have the example plugin updated. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #42 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Isn't there a problem if several plugins has the method defined? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113571|0 |1 is obsolete| | Attachment #113572|0 |1 is obsolete| | Attachment #113573|0 |1 is obsolete| | Attachment #113574|0 |1 is obsolete| | Attachment #113575|0 |1 is obsolete| | Attachment #113576|0 |1 is obsolete| | Attachment #113577|0 |1 is obsolete| | Attachment #113578|0 |1 is obsolete| | --- Comment #43 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 115172 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115172&action=edit Bug 26351: Add plugin hooks to transform 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 item barcode field on the checkin and checkout pages, and anywhere else you can scan an item barcode, type in some valid barcodes, but prefix them with X and postfix them with Y, e.g. X123456Y 5) Note the letters are removed by Koha! Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #44 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 115173 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115173&action=edit Bug 26351: (QA follow-up) Fix QA script issue * Fixes issue with barcode generate stub so perlcritic is happy * Removes extra semicolon from return call in configure method Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #45 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 115174 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115174&action=edit Bug 26351: Add unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #46 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 115175 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115175&action=edit Bug 26351: (QA follow-up) Remove unused method barcode_transform Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #47 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 115176 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115176&action=edit Bug 26351: (QA follow-up) Rename barcode_transform to item_barcode_transform Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #48 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 115177 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115177&action=edit Bug 26351: (QA follow-up) Barcodes inputted into Koha should always pass though barcodedecode Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #49 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 115178 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115178&action=edit Bug 26351: (QA follow-up) Catch one last case of itemBarcodeInputFilter Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #50 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 115179 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115179&action=edit Bug 26351: (QA follow-up) Fix Checkouts.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #51 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 115180 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115180&action=edit Bug 26351: Add call_recursive() as a replacement for call() The method call() is not sufficient for barcode transformations. It's possible that more than one barcode transformation plugin will be installed. call_recursive() takes the output of the first plugin and uses it as the input for the next plugin and so on. This allowes each plugin to see the current version of the barcode and modify it if necessary. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #52 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #42)
Isn't there a problem if several plugins has the method defined?
Looks like call() get modified so it no longer works for this patch set. I've introduced call_recursive() ( not technically recursive, can be renamed ) that fixes this and allows for multiple barcode transformation plugins to be called in succession! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply --- Comment #53 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Sorry dude, this needs a rebase.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #54 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I'm also not entirely sure about the final followup.. it feels like the intention of ->call is to loop through available plugins too.. call_recursive is almost a match code wise. I think it'll be difficult for developers to know which of the two methods to call when.. and perhaps difficult for plugin developers to understand what they should be returning... something that can be fed back into @args or something entirely different.. Hmm -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #115172|0 |1 is obsolete| | Attachment #115173|0 |1 is obsolete| | Attachment #115174|0 |1 is obsolete| | Attachment #115175|0 |1 is obsolete| | Attachment #115176|0 |1 is obsolete| | Attachment #115177|0 |1 is obsolete| | Attachment #115178|0 |1 is obsolete| | Attachment #115179|0 |1 is obsolete| | Attachment #115180|0 |1 is obsolete| | --- Comment #55 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 118649 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118649&action=edit Bug 26351: Add plugin hooks to transform 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 item barcode field on the checkin and checkout pages, and anywhere else you can scan an item barcode, type in some valid barcodes, but prefix them with X and postfix them with Y, e.g. X123456Y 5) Note the letters are removed by Koha! Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #56 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 118650 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118650&action=edit Bug 26351: (QA follow-up) Fix QA script issue * Fixes issue with barcode generate stub so perlcritic is happy * Removes extra semicolon from return call in configure method Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #57 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 118651 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118651&action=edit Bug 26351: Add unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #58 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 118652 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118652&action=edit Bug 26351: (QA follow-up) Remove unused method barcode_transform Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #59 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 118653 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118653&action=edit Bug 26351: (QA follow-up) Rename barcode_transform to item_barcode_transform Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #60 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 118654 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118654&action=edit Bug 26351: (QA follow-up) Barcodes inputted into Koha should always pass though barcodedecode Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #61 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 118655 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118655&action=edit Bug 26351: (QA follow-up) Catch one last case of itemBarcodeInputFilter Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #62 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 118656 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118656&action=edit Bug 26351: (QA follow-up) Fix Checkouts.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #63 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 118657 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118657&action=edit Bug 26351: Add call_recursive() as a replacement for call() The method call() is not sufficient for barcode transformations. It's possible that more than one barcode transformation plugin will be installed. call_recursive() takes the output of the first plugin and uses it as the input for the next plugin and so on. This allowes each plugin to see the current version of the barcode and modify it if necessary. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #64 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 118658 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118658&action=edit Bug 26351: Clean up includes in Circulation.pm Circulation.pm has so many includes that the same module is getting used multiple times without developers noticing it is already beuing used. This commit separates use lines by namespace and sorts them, removing duplicate and unnecessary use lines. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |28026 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28026 [Bug 28026] Add a 'call_recursive' method to Koha::Plugins -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118649|0 |1 is obsolete| | --- Comment #65 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118681 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118681&action=edit Bug 26351: Add plugin hooks to transform 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 item barcode field on the checkin and checkout pages, and anywhere else you can scan an item barcode, type in some valid barcodes, but prefix them with X and postfix them with Y, e.g. X123456Y 5) Note the letters are removed by Koha! Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118650|0 |1 is obsolete| | --- Comment #66 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118682 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118682&action=edit Bug 26351: (QA follow-up) Fix QA script issue * Fixes issue with barcode generate stub so perlcritic is happy * Removes extra semicolon from return call in configure method Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118651|0 |1 is obsolete| | --- Comment #67 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118683 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118683&action=edit Bug 26351: Add unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118652|0 |1 is obsolete| | --- Comment #68 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118684 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118684&action=edit Bug 26351: (QA follow-up) Remove unused method barcode_transform Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118653|0 |1 is obsolete| | --- Comment #69 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118685 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118685&action=edit Bug 26351: (QA follow-up) Rename barcode_transform to item_barcode_transform Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118654|0 |1 is obsolete| | --- Comment #70 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118686 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118686&action=edit Bug 26351: (QA follow-up) Barcodes inputted into Koha should always pass though barcodedecode Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118655|0 |1 is obsolete| | --- Comment #71 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118687 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118687&action=edit Bug 26351: (QA follow-up) Catch one last case of itemBarcodeInputFilter Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118656|0 |1 is obsolete| | --- Comment #72 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118688 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118688&action=edit Bug 26351: (QA follow-up) Fix Checkouts.t Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #73 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118689 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118689&action=edit Bug 26351: Use call_recursive() as a replacement for call() The method `call()` is not sufficient for barcode transformations. It's possible that more than one barcode transformation plugin will be installed. The `call_recursive()` method takes the output of the first plugin and uses it as the input for the next plugin and so on. This allowes each plugin to see the current version of the barcode and modify it if necessary. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118658|0 |1 is obsolete| | --- Comment #74 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118690 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118690&action=edit Bug 26351: Clean up includes in Circulation.pm Circulation.pm has so many includes that the same module is getting used multiple times without developers noticing it is already beuing used. This commit separates use lines by namespace and sorts them, removing duplicate and unnecessary use lines. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118657|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #75 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Passed QA again.. as it all works well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |BLOCKED --- Comment #76 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Blocked by bug 28026. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |BLOCKED --- Comment #77 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Kyle, this is still blocked by bug 28026. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118681|0 |1 is obsolete| | Attachment #118682|0 |1 is obsolete| | Attachment #118683|0 |1 is obsolete| | Attachment #118684|0 |1 is obsolete| | Attachment #118685|0 |1 is obsolete| | Attachment #118686|0 |1 is obsolete| | Attachment #118687|0 |1 is obsolete| | Attachment #118688|0 |1 is obsolete| | Attachment #118689|0 |1 is obsolete| | Attachment #118690|0 |1 is obsolete| | --- Comment #78 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 122433 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122433&action=edit Bug 26351: Add plugin hooks to transform 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 item barcode field on the checkin and checkout pages, and anywhere else you can scan an item barcode, type in some valid barcodes, but prefix them with X and postfix them with Y, e.g. X123456Y 5) Note the letters are removed by Koha! Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #79 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 122434 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122434&action=edit Bug 26351: (QA follow-up) Fix QA script issue * Fixes issue with barcode generate stub so perlcritic is happy * Removes extra semicolon from return call in configure method Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #80 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 122435 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122435&action=edit Bug 26351: Add unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #81 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 122436 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122436&action=edit Bug 26351: (QA follow-up) Remove unused method barcode_transform Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #82 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 122437 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122437&action=edit Bug 26351: (QA follow-up) Rename barcode_transform to item_barcode_transform Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #83 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 122438 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122438&action=edit Bug 26351: (QA follow-up) Barcodes inputted into Koha should always pass though barcodedecode Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #84 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 122439 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122439&action=edit Bug 26351: (QA follow-up) Catch one last case of itemBarcodeInputFilter Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #85 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 122440 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122440&action=edit Bug 26351: (QA follow-up) Fix Checkouts.t Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #86 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 122441 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122441&action=edit Bug 26351: Use call_recursive() as a replacement for call() The method `call()` is not sufficient for barcode transformations. It's possible that more than one barcode transformation plugin will be installed. The `call_recursive()` method takes the output of the first plugin and uses it as the input for the next plugin and so on. This allowes each plugin to see the current version of the barcode and modify it if necessary. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #87 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 122442 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122442&action=edit Bug 26351: Clean up includes in Circulation.pm Circulation.pm has so many includes that the same module is getting used multiple times without developers noticing it is already beuing used. This commit separates use lines by namespace and sorts them, removing duplicate and unnecessary use lines. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #88 from Jonathan Druart <jonathan.druart+koha@gmail.com> ---
Created attachment 122442 [details] [review] Bug 26351: Clean up includes in Circulation.pm
This patch does not belong here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #122442|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #122433|0 |1 is obsolete| | Attachment #122434|0 |1 is obsolete| | Attachment #122435|0 |1 is obsolete| | Attachment #122436|0 |1 is obsolete| | Attachment #122437|0 |1 is obsolete| | Attachment #122438|0 |1 is obsolete| | Attachment #122439|0 |1 is obsolete| | Attachment #122440|0 |1 is obsolete| | Attachment #122441|0 |1 is obsolete| | --- Comment #89 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 124258 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124258&action=edit Bug 26351: Add plugin hooks to transform 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 item barcode field on the checkin and checkout pages, and anywhere else you can scan an item barcode, type in some valid barcodes, but prefix them with X and postfix them with Y, e.g. X123456Y 5) Note the letters are removed by Koha! Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #90 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 124259 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124259&action=edit Bug 26351: (QA follow-up) Fix QA script issue * Fixes issue with barcode generate stub so perlcritic is happy * Removes extra semicolon from return call in configure method Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #91 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 124260 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124260&action=edit Bug 26351: Add unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #92 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 124261 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124261&action=edit Bug 26351: (QA follow-up) Remove unused method barcode_transform Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #93 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 124262 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124262&action=edit Bug 26351: (QA follow-up) Rename barcode_transform to item_barcode_transform Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #94 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 124263 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124263&action=edit Bug 26351: (QA follow-up) Barcodes inputted into Koha should always pass though barcodedecode Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #95 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 124264 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124264&action=edit Bug 26351: (QA follow-up) Catch one last case of itemBarcodeInputFilter Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #96 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 124265 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124265&action=edit Bug 26351: (QA follow-up) Fix Checkouts.t Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #97 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 124266 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124266&action=edit Bug 26351: Use call_recursive() as a replacement for call() The method `call()` is not sufficient for barcode transformations. It's possible that more than one barcode transformation plugin will be installed. The `call_recursive()` method takes the output of the first plugin and uses it as the input for the next plugin and so on. This allowes each plugin to see the current version of the barcode and modify it if necessary. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #98 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- t/db_dependent/Koha/Plugins/Circulation_hooks.t is failing. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #99 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 124313 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124313&action=edit Bug 26351: Fix t/db_dependent/Koha/Plugins/Circulation_hooks.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #100 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Failing test: # Failed test 'Only four plugins found via a metadata tag' # at /kohadevbox/koha/t/db_dependent/Koha/Plugins/Plugins.t line 129. # got: '2' # expected: '4' # Looks like you failed 1 test of 2. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #101 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 125447 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125447&action=edit Bug 26351: Revert improper change to unit test, fix number of tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #102 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 125763 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125763&action=edit Bug 26351: Remove uneeded use Koha::Plugins statements Left over from previous changes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #103 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 125764 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125764&action=edit Bug 26351: Add missing barcodedecode import -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124258|0 |1 is obsolete| | Attachment #124259|0 |1 is obsolete| | Attachment #124260|0 |1 is obsolete| | Attachment #124261|0 |1 is obsolete| | Attachment #124262|0 |1 is obsolete| | Attachment #124263|0 |1 is obsolete| | Attachment #124264|0 |1 is obsolete| | Attachment #124265|0 |1 is obsolete| | Attachment #124266|0 |1 is obsolete| | Attachment #124313|0 |1 is obsolete| | Attachment #125447|0 |1 is obsolete| | Attachment #125763|0 |1 is obsolete| | Attachment #125764|0 |1 is obsolete| | --- Comment #104 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 125765 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125765&action=edit Bug 26351: Add plugin hooks to transform 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 item barcode field on the checkin and checkout pages, and anywhere else you can scan an item barcode, type in some valid barcodes, but prefix them with X and postfix them with Y, e.g. X123456Y 5) Note the letters are removed by Koha! Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Bug 26351: (QA follow-up) Fix QA script issue * Fixes issue with barcode generate stub so perlcritic is happy * Removes extra semicolon from return call in configure method Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Bug 26351: Add unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Bug 26351: (QA follow-up) Remove unused method barcode_transform Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Bug 26351: (QA follow-up) Rename barcode_transform to item_barcode_transform Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Bug 26351: (QA follow-up) Barcodes inputted into Koha should always pass though barcodedecode Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Bug 26351: (QA follow-up) Catch one last case of itemBarcodeInputFilter Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Bug 26351: (QA follow-up) Fix Checkouts.t Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Bug 26351: Use call_recursive() as a replacement for call() The method `call()` is not sufficient for barcode transformations. It's possible that more than one barcode transformation plugin will be installed. The `call_recursive()` method takes the output of the first plugin and uses it as the input for the next plugin and so on. This allowes each plugin to see the current version of the barcode and modify it if necessary. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Bug 26351: Fix t/db_dependent/Koha/Plugins/Circulation_hooks.t Bug 26351: Revert improper change to unit test, fix number of tests Bug 26351: Remove uneeded use Koha::Plugins statements Left over from previous changes Bug 26351: Add missing barcodedecode import -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27526 --- Comment #105 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I've squashed all the patches (the diff is much more easier to read!) and rebased it on top of bug 27526. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27526 [Bug 27526] Remove Mod/AddItemFromMarc from additem.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #106 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #105)
I've squashed all the patches (the diff is much more easier to read!) and rebased it on top of bug 27526.
Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #107 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29114 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #108 from Fridolin Somers <fridolin.somers@biblibre.com> --- This is great. I've edited "First version" in https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Bug 26351 depends on bug 27526, which changed state. Bug 27526 Summary: Remove Mod/AddItemFromMarc from additem.pl https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27526 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Bug 26351 depends on bug 28026, which changed state. Bug 28026 Summary: Add a 'call_recursive' method to Koha::Plugins https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28026 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31252 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31252 [Bug 31252] Advanced search in staff interface should call barcodedecode if the search index is a barcode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31253 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31253 [Bug 31253] Item search in staff interface should call barcodedecode if the search index is a barcode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31482 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31482 [Bug 31482] Label creator does not call item_barcode_transform plugin hook -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34171 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34171 [Bug 34171] item_barcode_transform does not work when moving items -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org