| Summary: | Barcode file does not work in modifying items in batch | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Federico Paiz <federicoantoniopaiz> |
| Component: | Cataloging | Assignee: | Nick Clemens (kidclamp) <nick> |
| Status: | CLOSED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
| Severity: | major | ||
| Priority: | P5 - low | CC: | bwsdonna, lucas, m.de.rooy, magnus, martin.renvoize, nick |
| Version: | 18.11 | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | Trivial patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: |
19.05.00, 18.11.05
|
|
| Circulation function: | |||
| Bug Depends on: | 21183 | ||
| Bug Blocks: | |||
| Attachments: |
screen
txt Bug 22288: Correct item search in batchMod by barcode file Bug 22288: Correct item search in batchMod by barcode file |
||
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 |
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.