[Koha-bugs] [Bug 7901] Add batch delete borrowers script
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Jul 20 21:22:06 CEST 2012
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7901
--- Comment #3 from Owen Leonard <oleonard at 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.
More information about the Koha-bugs
mailing list