Created attachment 84847 [details] screen in going through txt the inventory ( Home › Tools › Batch item modification ), it gives me as a result : Can't use string ("0") as an ARRAY ref while "strict refs" in use at /usr/share/koha/intranet/cgi-bin/tools/batchMod.pl line 251, <$fh> line 69.
What did your .txt file look like? Where there any empty lines or 0 in lines?
Created attachment 84848 [details] txt it looks like this
the code is fine? /usr/share/koha/intranet/cgi-bin/tools/batchMod.pl @contentlist = uniq @contentlist; if ($filecontent eq 'barcode_file') { my $existing_items = Koha::Items->search({ itemnumber =>\@contentlist }); @itemnumbers = $existing_items->get_column('itemnumber'); my %exists = map {$_=>1}@{$existing_items->get_column('barcode')}; @notfoundbarcodes = grep { !$exists{$_} } @contentlist; }
Created attachment 87571 [details] [review] Bug 22288: Correct item search in batchMod by barcode file To test: 1 - Have a list of barcodes that exist in your catalog 2 - Go to Tools->Batch item modification 3 - Attempt to modify items using the list 4 - Get an error page 5 - Apply patch 6 - Repeat 7 - Modification should work correctly
Created attachment 87579 [details] [review] Bug 22288: Correct item search in batchMod by barcode file To test: 1 - Have a list of barcodes that exist in your catalog 2 - Go to Tools->Batch item modification 3 - Attempt to modify items using the list 4 - Get an error page 5 - Apply patch 6 - Repeat 7 - Modification should work correctly Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Silly error, going straight for QA on this one.. No regressions found. Passed QA
Awesome work all! Pushed to master for 19.05
I can confirm that this fix also works on 18.11.02.
Pushed to 18.11.x for 18.11.05
missing dependecny, not backporting to 18.05.x