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>
This commit is contained in:
parent
b40e58343e
commit
851d41ab6b
1 changed files with 1 additions and 1 deletions
|
@ -328,7 +328,7 @@ if ( $compareinv2barcd ) {
|
|||
my $barcode = $item->{barcode};
|
||||
if( !$barcode ) {
|
||||
$item->{problems}->{no_barcode} = 1;
|
||||
} elsif ( grep /^$barcode$/, @scanned_barcodes ) {
|
||||
} elsif ( grep { $_ eq $barcode } @scanned_barcodes ) {
|
||||
next;
|
||||
} else {
|
||||
$item->{problems}->{not_scanned} = 1;
|
||||
|
|
Loading…
Reference in a new issue