https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38452 --- Comment #8 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (In reply to Marcel de Rooy from comment #4)
Not sure if this change is enough. Look at following lines:
my @items = Koha::Items->search( { barcode => { -in => \@barcodes } } )->as_list; my %items = map { $_->barcode => $_ } @items; foreach my $barcode (@barcodes) { my $item = $items{ $barcode };
$barcode that is looked up in the hash comes from @barcodes which now contains only lowercase barcodes, right? But the %items hash comes from a Koha::Items search. The SQL search is case insensitive and might return uppercase barcodes. Therefore $items{ABC123} does not exist, resulting in ERR_BARCODE, right?
This shows that your test plan should also cover the ABC123 barcode case.
Did you check if we have similar issues further on in the script?
Please clarify.
Thanks Marcel, that's a valid point. The lc() conversion should be after the SQL lookup. I'll change my patch. -- You are receiving this mail because: You are watching all bug changes.