Bug 23006: Cannot use inventory with barcodes containing special chars
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Wed, 29 May 2019 13:46:15 +0000 (13:46 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 4 Jun 2019 08:39:43 +0000 (09:39 +0100)
commit851d41ab6b9ec28901086d6a6ce15b3fd589182a
tree7e8805c0f847a28d10480a32c3178226f43746c0
parentb40e58343ef65aabe0a575a0b3f842b5e22a3600
Bug 23006: Cannot use inventory with barcodes containing special chars

If a barcode contains special characters like $, the regex in inventory
does no longer work.
This fix (as suggested by Jonathan) replaces the regex by a eq compare.

Test plan:
Pick one barcode and add a $ somewhere in the middle, say 123$456.
Include this barcode in a barcode file for inventory.
Run inventory on that file and verify that barcode was read and datelastseen
was updated. The barcode should not be reported as missing (not scanned).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
tools/inventory.pl