From 6ba9061907d0871c7d8b8cb380b8935677bb9753 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 15 Nov 2024 23:03:59 +0000 Subject: [PATCH] Bug 38452: Add lc() for case insensitivity To test: 1. Create an item give it a barcode like 'abc123'; 2. Try creating a 2nd item with a barcode: 'ABC123', you get an error 'Error saving item: Barcode must be unique.' 3. Checkin the item 'ABC123', the 'abc123' item successfully checks in. 4. The case doesn't seem to matter elsewhere in Koha ( check-in, checkout, searching, batch tools ) 5. Try the inventory tool and use 'ABC123'. The barcode is not found. 6. APPLY PATCH, restart_all 7. Try the inventory tool again with both 'abc123' and 'ABC123', they should now both work. --- tools/inventory.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/inventory.pl b/tools/inventory.pl index 1c94183596..acebf6aa61 100755 --- a/tools/inventory.pl +++ b/tools/inventory.pl @@ -191,7 +191,7 @@ if ( $op eq 'cud-inventory' for my $barcode (@uploadedbarcodes) { next unless $barcode; - $barcode = barcodedecode($barcode); + $barcode = lc(barcodedecode($barcode)); ++$lines_read; if (length($barcode)>$barcode_size) { -- 2.39.2