https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18855
Michael Hafen <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |In Discussion --- Comment #11 from Michael Hafen <[email protected]> --- (In reply to Jonathan Druart from comment #10) > Can you provide tests, please? Looking through the db_dependent/Overdues.t file I notice that Koha expects a new fine to be generated if an overdue book is renewed and then becomes overdue again. This complicates things since a book renewed just after the cronjob starts could look like it was renewed previously and became overdue again. Now I'm trying to think of how to tell the difference between a book renewed a couple weeks ago (for example) and a book renewed after the cronjob started. Does the cronjob/fines.pl script need to pull the fines status again just before updating the fine to make sure the status hasn't changed, instead of changing how C4::Overdues::UpdateFine() handles status? But then we'd have to make the cronjob lock the database at the point of refreshing the status and updating the fine; otherwise we've only reduced the window on the race condition (to nearly nil). Or is the very small chance of a race condition good enough? (I don't think it is, but I don't like locking the database during operating hours either.) I'm going to chose the locking option, and make a new patch to do that. (Bonus, I don't have to write a test case ;) ) -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://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/
