https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41514

--- Comment #6 from Paul Derscheid <[email protected]> ---
Created attachment 204928
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204928&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 <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to