http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Paul Poulain <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Passed QA                   |Failed QA

--- Comment #23 from Paul Poulain <[email protected]> ---
Failed QA, and a tricky one !!!

When tmp_reserve is created, it is from reserves, so with 
borrowernumber being NOT NULL default 0

When old_reserves is copied to tmp_reserves ... all NULL borrowernumbers are
transformed to 0 ... and when it's copied back to old_reserves ... booom,
contraint failed:

[Sun Jun 10 18:28:14 2012] updatedatabase.pl: DBD::mysql::db do failed: Cannot
add or update a child row: a foreign key constraint fails
(`lecannetdesmaures`.`old_reserves`, CONSTRAINT `old_reserves_ibfk_1` FOREIGN
KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET
NULL ON UPDATE SET NULL) at
/home/paul/koha.dev/koha-community/installer/data/mysql/updatedatabase.pl line
5395.


That's a common situation to have NULL in old_reserves, when a borrower is
removed from the database but we want to keep the history of the hold "someone
placed a hold on yyyy-mm-dd"

I think the solution would be to have tmp_reserve be created from old_reserve,
to enable the NULL field !

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to