https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41514 --- Comment #9 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 204954 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204954&action=edit Bug 41514: (QA follow-up) Add Koha::Bookings->filter_by_overlapping After the previous follow-up the lead/trail rule lookup and the expanded overlap query existed three times: in Koha::Item::check_booking, Koha::Biblio::check_booking and Koha::Booking::_assign_item_for_booking. - Add Koha::Bookings->filter_by_overlapping, taking the period and the lead/trail days; callers chain it with filter_by_active - Fetch both rules with a single get_effective_rules call at each site - Use the new method at the three call sites Test plan: 1. prove t/db_dependent/Koha/Bookings.t t/db_dependent/Koha/Booking.t t/db_dependent/Koha/Item.t t/db_dependent/Koha/Biblio.t t/db_dependent/api/v1/bookings.t Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.