[Koha-bugs] [Bug 26351] Add plugin hooks to transform item barcodes

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Sep 11 11:08:32 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351

Julian Maurice <julian.maurice at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |julian.maurice at biblibre.com

--- Comment #5 from Julian Maurice <julian.maurice at 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.


More information about the Koha-bugs mailing list