https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41887 Bug ID: 41887 Summary: Booking::store runs clash detection on terminal status transition causing 500 on checkout Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: paul.derscheid@lmscloud.de QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com - Booking::store runs item-level and biblio-level clash detection unconditionally on every call - During checkout, C4::Circulation sets the booking status to 'completed' and calls ->store(), which triggers these checks - Combined with false positives from Biblio::check_booking (e.g. checkouts on non-bookable sibling items inflating the unavailable count, see Bug XXXXX), this throws Koha::Exceptions::Booking::Clash resulting in an unhandled 500 error - Even without false positives, running clash detection on a terminal transition (completed/cancelled) is unnecessary and should be skipped Steps to reproduce: - Have a biblio with two items: one bookable, one not (bookable = 0). - Create a booking on the bookable item. - Check out the non-bookable item to a patron. - Check out the bookable item to the booking patron. - Expected: Checkout succeeds, booking transitions to completed. - Actual: 500 internal server error from Koha::Exceptions::Booking::Clash. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.