[Bug 15079] New: Batch Delete Records Error
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15079 Bug ID: 15079 Summary: Batch Delete Records Error Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org When using the batch deletion tool, if the script attempts to delete an undeletable item, the script will die with the error: Label not found for "next BIBLIONUMBER" at /usr/share/koha/intranet/cgi-bin/tools/batch_delete_records.pl line 172. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15079 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15079 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15079 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 44146 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44146&action=edit Bug 15079 - Batch Delete Records Error When using the batch deletion tool, if the script attempts to delete an undeletable item, the script will die with the error: Label not found for "next BIBLIONUMBER" at /usr/share/koha/intranet/cgi-bin/tools/batch_delete_records.pl line 172. Test Plan: 1) Attempt to batch delete a record with an item that cannot be deleted 2) Note error 3) Apply this patch 4) Repeat step 1 5) Note the error no longer occurs -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15079 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hector.hecaxmmx@gmail.com --- Comment #2 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Hi Kyle Another kind of error occur when you only enter one record with an item checked out. The record is highlighted but let delete it with message " All records have been deleted successfully! ", but when you go to see the record, the record still there. I think if only one record exist with an item that cannot deleted, the module must prevent to perform the action in some way. Regards -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15079 --- Comment #3 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Hi Kyle I cannot reproduce the error. Is this in master? I'm testing with a fresh installation with only three records (one ítem per record and just one with item that cannot be deleted), but works well for me. Regards -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15079 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- It may be that I'm test plan is incomplete. I spotted the error after a library reported the issue. The bad label clearly exists in master, but the problem records had already been removed so I was unable to reproduce the issue. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15079 --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Looks like the issue is related to deleteditems having the same itemnumber is an item that is going to be deleted: http://screencast.com/t/jTd5b2DcB3A After clearing out duplicate itemnumber from deleteditems: http://screencast.com/t/PJxpEkf1DP -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15079 --- Comment #6 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- (In reply to Kyle M Hall from comment #5)
Looks like the issue is related to deleteditems having the same itemnumber is an item that is going to be deleted:
http://screencast.com/t/jTd5b2DcB3A
After clearing out duplicate itemnumber from deleteditems:
How itemnumber is corrupted in the table? I mean it is a unique Id even though if you execute something like this UPDATE items SET itemnumber='1' WHERE itemnumber='2'; ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY' MYSQL doesn't let to do this kind of operations. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15079 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44146|0 |1 is obsolete| | --- Comment #7 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 44303 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44303&action=edit [SIGNED-OFF]Bug 15079 - Batch Delete Records Error When using the batch deletion tool, if the script attempts to delete an undeletable item, the script will die with the error: Label not found for "next BIBLIONUMBER" at /usr/share/koha/intranet/cgi-bin/tools/batch_delete_records.pl line 172. Test Plan: 1) Attempt to batch delete a record with an item that cannot be deleted 2) Note error 3) Apply this patch 4) Repeat step 1 5) Note the error no longer occurs Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised. Follow comment 5 to reproduce the issue -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15079 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15079 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15079 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44303|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 44831 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44831&action=edit Bug 15079 - Batch Delete Records Error When using the batch deletion tool, if the script attempts to delete an undeletable item, the script will die with the error: Label not found for "next BIBLIONUMBER" at /usr/share/koha/intranet/cgi-bin/tools/batch_delete_records.pl line 172. Test Plan: 1) Attempt to batch delete a record with an item that cannot be deleted 2) Note error 3) Apply this patch 4) Repeat step 1 5) Note the error no longer occurs Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised. Follow comment 5 to reproduce the issue Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> I have not tested this patch, but looking at the code it is obviously a mistake. If an error occured, we rollback and skip this record. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15079 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Kyle! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15079 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #10 from Frédéric Demians <frederic@tamil.fr> --- This patch has been pushed to 3.20.x, will be in 3.20.6. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15079 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |liz@catalyst.net.nz --- Comment #11 from Liz Rea <liz@catalyst.net.nz> --- Pushed to 3.18.13, and released. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org