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.