]> git.koha-community.org Git - koha.git/commit
Bug 30409: barcodedecode() should always trim barcode
authorPetro Vashchuk <stalkernoid@gmail.com>
Sat, 2 Apr 2022 21:02:40 +0000 (00:02 +0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 14 Jun 2022 10:54:58 +0000 (07:54 -0300)
commite2611c919dd5287402b89f219d75d3a013407123
tree685b7f7dab002bdc43092c96f42d822162c4c5fb
parent824b676de7b0a6b288c1dea31ad839c662b17893
Bug 30409: barcodedecode() should always trim barcode

Barcode is trimmed of leading/trailing whitespaces in many instances
before the barcodedecode sub was called. This patch instead makes that
barcodedecode sub is going to trim it itself and removes unnecessary,
and repetitive code that was used before barcodedecode was called.

Steps to test:
1. Edit item with any barcode, add a bunch of whitespaces at the start
and at the bottom of it. Save the item. Ensure that this action ruins
the barcode and ensure that the spaces are still there by editing the
same item again.
2. Apply the patch.
3. Edit the same item again in the same fashion. Ensure that now all
whitespaces are getting trimmed and it doesn't affect the barcode in
any negative way.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Circulation.pm
circ/branchtransfers.pl
circ/circulation.pl
circ/renew.pl
circ/returns.pl
course_reserves/add_items.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
t/Circulation_barcodedecode.t