Summary: | Batch item modification tool throws error 500 when an itemnumber is invalid | ||
---|---|---|---|
Product: | Koha | Reporter: | Victor Grousset/tuxayo <victor> |
Component: | Tools | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, julian.maurice, martin.renvoize, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21142 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 18262 | ||
Bug Blocks: | |||
Attachments: |
Bug 21151: Fix SRU search fields mapping pop-up
Bug 21141: Handle non-existent itemnumbers in batch item modification/deletion Bug 21141: Handle non-existent itemnumbers in batch item modification/deletion Bug 21141: Handle non-existent itemnumbers in batch item modification/deletion |
Description
Victor Grousset/tuxayo
2018-08-01 19:18:13 UTC
Actually just one invalid itemnumber is enough. I'm not sure to work on this. Anyone can feel free to take it. Details: Error is here: https://gitlab.com/koha-community/Koha/blob/ce96080f3005be5a63c9f2cab8d4b6c81e9b5b27/tools/batchMod.pl#L580 Because $biblio is undef Because $itemdata is undef (or empty I forgot) Note that when uploading a barcode file, there is an error handling logic which displays the invalid numbers. So the fix could be built from there. Created attachment 77459 [details] [review] Bug 21151: Fix SRU search fields mapping pop-up The SRU search fields mapping pop-up comes up as a blank white page. To test: - Go to Administration > Z39.50/SRU servers - Modify or create an SRU server - Click on the 'Modify' button to change mappings - Verify the new window that opens is blank - Apply patch - Verify the pop-up now is no longer blank but works correctly. Bonus: Spottd some HTML errors while looking for the problem. Also fixed in the patch. Sorry, got typo in bug number. Caused by commit bd3b1c1a33e4bb14bbcd10a0fcf871b39362430d Bug 18262: Koha::Biblio - Remove GetBiblioData - part 1 Created attachment 77497 [details] [review] Bug 21141: Handle non-existent itemnumbers in batch item modification/deletion The itemnumber list passed from a file in the batch item modification/deletion tools is not tested. Like barcodes we should make sure they refer to a valid items in the DB. Test plan: - Create a file with barcodes, itemnumbers and random lines - Use the batch item modification and deletion tools with this file You should see a table with a list of invalid barcodes and itemnumbers. Without this patch you got the following error: Can't call method "title" on an undefined value at /home/vagrant/kohaclone/tools/batchMod.pl line 580 Created attachment 77528 [details] [review] Bug 21141: Handle non-existent itemnumbers in batch item modification/deletion The itemnumber list passed from a file in the batch item modification/deletion tools is not tested. Like barcodes we should make sure they refer to a valid items in the DB. Test plan: - Create a file with barcodes, itemnumbers and random lines - Use the batch item modification and deletion tools with this file You should see a table with a list of invalid barcodes and itemnumbers. Without this patch you got the following error: Can't call method "title" on an undefined value at /home/vagrant/kohaclone/tools/batchMod.pl line 580 Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 77554 [details] [review] Bug 21141: Handle non-existent itemnumbers in batch item modification/deletion The itemnumber list passed from a file in the batch item modification/deletion tools is not tested. Like barcodes we should make sure they refer to a valid items in the DB. Test plan: - Create a file with barcodes, itemnumbers and random lines - Use the batch item modification and deletion tools with this file You should see a table with a list of invalid barcodes and itemnumbers. Without this patch you got the following error: Can't call method "title" on an undefined value at /home/vagrant/kohaclone/tools/batchMod.pl line 580 Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Awesome work all! Pushed to master for 18.11 Pushed to 18.05.x for 18.05.03 Pushed to 17.11.x for 17.11.11 |