[Bug 7901] New: Add batch delete borrowers script
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7901 Priority: P5 - low Change sponsored?: --- Bug ID: 7901 Assignee: gmcharlt@gmail.com Summary: Add batch delete borrowers script QA Contact: koha.sekjal@gmail.com Severity: enhancement Classification: Unclassified OS: All Reporter: kyle.m.hall@gmail.com Hardware: All Status: NEW Version: master Component: Command-line Utilities Product: Koha Add simple script to batch delete borrowers via a list of cardnumbers. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7901 --- Comment #1 from Kyle M Hall <kyle.m.hall@gmail.com> --- Created attachment 8914 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8914&action=edit Bug 7901 - Add batch delete borrowers script Simple script that takes a file of borrower cardnumbers and deletes those borrowers. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7901 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7901 delaye <stephane.delaye@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stephane.delaye@biblibre.co | |m --- Comment #2 from delaye <stephane.delaye@biblibre.com> --- why i can't load the cardnumber file in koha it will be more easy for the users... i have this message perl batch_delete_borrowers.pl --f file_test -c DBD::mysql::st execute failed: Column count doesn't match value count at row 1 at /home/koha/src/C4/Members.pm line 1679, <FILE> line 1. DBD::mysql::st execute failed: Column count doesn't match value count at row 1 at /home/koha/src/C4/Members.pm line 1679, <FILE> line 2. DBD::mysql::st execute failed: Column count doesn't match value count at row 1 at /home/koha/src/C4/Members.pm line 1679, <FILE> line 3. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7901 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- I tried loading a file which included one patron with checkouts, one without. The patron with no checkouts was deleted without error, the one with checkouts prompted this: Working on cardnumber 0093698 DBD::mysql::st execute failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha`.`issues`, CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON UPDATE CASCADE) at /home/oleonard/kohaclone/C4/Members.pm line 1708, <FILE> line 2. Deleting borrower John Smith ( 0093698 ) ... deleted. Sounds like the script tries its best to delete and it's the error that prevents it? I would think that unless there is an explicit plan for how to handle checkouts the script should skip these accounts and report it. After that I tried loading the same file again (including the patron record which had already been deleted) and got this error: Working on cardnumber 0049138 Use of uninitialized value in concatenation (.) or string at batch_delete_borrowers.pl line 80, <FILE> line 1. Use of uninitialized value in concatenation (.) or string at batch_delete_borrowers.pl line 80, <FILE> line 1. Use of uninitialized value in concatenation (.) or string at batch_delete_borrowers.pl line 80, <FILE> line 1. Deleting borrower ( ) ... deleted. It would be nice to handle that situation gracefully. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7901 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Looks like the script deletes holds which were on a deleted patron's account but doesn't move them to old_reserves? I assume it should, since deleting a hold via reserve/request.pl does so. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7901 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |kyle.m.hall@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7901 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8914|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 11090 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11090&action=edit Bug 7901 - Add batch delete borrowers script Simple script that takes a file of borrower cardnumbers and deletes those borrowers. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7901 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff CC| |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=7901 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #6 from Owen Leonard <oleonard@myacpl.org> --- This revision seems to address the problem with handling patron barcodes which don't exist but doesn't fix the problem deleting patrons with checkouts and still doesn't move holds to old_reserves. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7901 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |In Discussion --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to comment #6)
This revision seems to address the problem with handling patron barcodes which don't exist but doesn't fix the problem deleting patrons with checkouts and still doesn't move holds to old_reserves.
I was under the assumption that MoveMemberToDeleted took care of this. Is there a sub call the script should be making that it doesn't? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7901 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I wonder if those options should be added to the delete_borrowers.pl script that already is in Koha. If we have 2 scripts, we should make clear where the differences are and they should both delete patrons the same way, taking fines, holds etc. into account. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org