Koha/tools
Kyle M Hall b2b1483f4d 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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-06 14:56:09 +02:00
..
csv-profiles
access_files.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
additional-contents.pl Bug 28717: Fix additional content logs 2021-10-05 09:17:20 +02:00
ajax-inventory.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
automatic_item_modification_by_age.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
background-job-progress.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
batch_delete_records.pl Bug 26080: Use the task queue for batch delete authorities 2021-10-01 15:35:36 +02:00
batch_extend_due_dates.pl
batch_record_modification.pl Bug 28835: Fix ability to pass list contents to batch record modification 2021-08-11 12:53:54 +02:00
batch_records_ajax.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
batchMod.pl Bug 26351: Add plugin hooks to transform item barcodes 2021-10-06 14:56:09 +02:00
cleanborrowers.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
copy-holidays.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
csv-profiles.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
exceptionHolidays.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
export.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
holidays.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
import_borrowers.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
inventory.pl Bug 26351: Add plugin hooks to transform item barcodes 2021-10-06 14:56:09 +02:00
letter.pl Bug 24387: Rename "News" with "Additional contents" 2021-08-16 11:55:55 +02:00
manage-marc-import.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
marc_modification_templates.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
modborrowers.pl Bug 24019: Patron batch modification based on borrowernumber 2021-08-30 17:02:07 +02:00
newHolidays.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
overduerules.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
picture-upload.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
problem-reports.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
quotes-upload.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
quotes.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
scheduler.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
showdiffmarc.pl Bug 17600: Fix missing C4::AuthoritiesMARC import 2021-07-29 15:34:25 +02:00
stage-marc-import.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
stockrotation.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
tools-home.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
upload-cover-image.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
upload-file.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
upload.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
viewlog.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00