[Bug 20462] New: Duplicate barcodes in batch item deletion cause software error if deleting biblio records.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20462 Bug ID: 20462 Summary: Duplicate barcodes in batch item deletion cause software error if deleting biblio records. Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: barton@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org To re-create: 1) Create a text file containing duplicate barcodes Here's a quick way to do that, substitute INSTANCE for the instance name of your test server: sudo koha-mysql INSTANCE <<< "select barcode from items where barcode is not null limit 3" | sed '1d;p' > /tmp/dup_barcodes.txt 2) Go to Home › Tools › Batch item deletion 3) Click 'Choose File', select the file you created in step 1. 4) Click 'Continue' 5) Note that duplicate items appear in the list of items to batch delete 6) Check 'Delete records if no items remain' 7) This will trigger a software error Here is the output from the intranet error log: [Thu Mar 22 08:49:35.030497 2018] [cgi:error] [pid 26116] [client x.x.x.x:y] AH01215: [Thu Mar 22 08:49:35 2018] batchMod.pl: CCL parsing error (10014) Search word expected ZOOM for query: hi= at /usr/share/koha/lib/C4/Search.pm line 275., referer: https://intranet.bywatersolutions.com/cgi-bin/koha/tools/batchMod.pl [Thu Mar 22 08:49:35.039872 2018] [cgi:error] [pid 26116] [client x.x.x.x:y] AH01215: [Thu Mar 22 08:49:35 2018] batchMod.pl: DBIx::Class::Storage::DBI::select_single(): Query returned more than one row. SQL that returns multiple rows is DEPRECATED for ->find and ->single at /usr/share/koha/lib/Koha/Objects.pm line 92, referer: https://intranet.bywatersolutions.com/cgibin/koha/tools/batchMod.pl [Thu Mar 22 08:49:35.040735 2018] [cgi:error] [pid 26116] [client x.x.x.x:y] AH01215: [Thu Mar 22 08:49:35 2018] batchMod.pl: Can't call method "items" on an undefined value at /usr/share/koha/intranet/cgi-bin/tools/batchMod.pl line 187., referer: https://intranet.bywatersolutions.com/cgi-bin/koha/tools/batchMod.pl Note that entering the barcodes via the 'scan items one by one' text box removes duplicates in the list, so this only causes problems when uploading a file. It doesn't matter whether you choose duplicate barcodes or duplicate item numbers, both trigger the some error. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20462 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20462 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |jonathan.druart@bugs.koha-c | |ommunity.org Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20462 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=9509 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20462 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20462 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 73285 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73285&action=edit Bug 20462: Ensure batch item deletion will not delete the same item twice This has been done on bug 9509 when barcodes are scaned, but not when using a text file. Test plan (stolen from Barton on the bug report): 1) Create a text file containing duplicate barcodes Here's a quick way to do that, substitute INSTANCE for the instance name of your test server: sudo koha-mysql INSTANCE <<< "select barcode from items where barcode is not null limit 3" | sed '1d;p' > /tmp/dup_barcodes.txt 2) Go to Home › Tools › Batch item deletion 3) Click 'Choose File', select the file you created in step 1. 4) Click 'Continue' 5) Note that duplicate items appear in the list of items to batch delete 6) Check 'Delete records if no items remain' 7) This will trigger a software error Note that entering the barcodes via the 'scan items one by one' text box removes duplicates in the list, so this only causes problems when uploading a file. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20462 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20462 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #73285|0 |1 is obsolete| | --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 73297 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73297&action=edit Bug 20462: Ensure batch item deletion will not delete the same item twice This has been done on bug 9509 when barcodes are scaned, but not when using a text file. Test plan (stolen from Barton on the bug report): 1) Create a text file containing duplicate barcodes Here's a quick way to do that, substitute INSTANCE for the instance name of your test server: sudo koha-mysql INSTANCE <<< "select barcode from items where barcode is not null limit 3" | sed '1d;p' > /tmp/dup_barcodes.txt 2) Go to Home › Tools › Batch item deletion 3) Click 'Choose File', select the file you created in step 1. 4) Click 'Continue' 5) Note that duplicate items appear in the list of items to batch delete 6) Check 'Delete records if no items remain' 7) This will trigger a software error Note that entering the barcodes via the 'scan items one by one' text box removes duplicates in the list, so this only causes problems when uploading a file. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20462 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20462 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #73297|0 |1 is obsolete| | --- Comment #3 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 73411 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73411&action=edit Bug 20462: Ensure batch item deletion will not delete the same item twice This has been done on bug 9509 when barcodes are scaned, but not when using a text file. Test plan (stolen from Barton on the bug report): 1) Create a text file containing duplicate barcodes Here's a quick way to do that, substitute INSTANCE for the instance name of your test server: sudo koha-mysql INSTANCE <<< "select barcode from items where barcode is not null limit 3" | sed '1d;p' > /tmp/dup_barcodes.txt 2) Go to Home › Tools › Batch item deletion 3) Click 'Choose File', select the file you created in step 1. 4) Click 'Continue' 5) Note that duplicate items appear in the list of items to batch delete 6) Check 'Delete records if no items remain' 7) This will trigger a software error Note that entering the barcodes via the 'scan items one by one' text box removes duplicates in the list, so this only causes problems when uploading a file. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20462 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com QA Contact|testopia@bugs.koha-communit |josef.moravec@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20462 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 18.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20462 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Summary|Duplicate barcodes in batch |Duplicate barcodes in batch |item deletion cause |item deletion cause |software error if deleting |software error if deleting |biblio records. |biblio records -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20462 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |nick@bywatersolutions.com --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Pushed to stable for 17.11.06 Awesome work all! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20462 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20462 --- Comment #6 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.05.x for v17.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20462 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org