https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42386
--- Comment #2 from Tomás Cohen Arazi (tcohen) <[email protected]> --- Created attachment 198770 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198770&action=edit Bug 42386: Add Koha::Patron::Availability::Hold, chain and wire Adds patron-level hold availability checks and chains them into the item-level class. CanItemBeReserved becomes a thin wrapper. Koha::Patron::Availability::Hold checks: - Eligibility (no item context): expired, debt_limit, bad_address, card_lost, restricted, global maxreserves - Count limits (with item_type_id + library_id): holds_per_record, holds_per_day, reservesallowed, max_holds Koha::Item::Availability::Hold now calls patron-level first (unless skip_patron_checks is set), then adds item-specific blockers to the same Koha::Result::Availability object. No result merging needed. CanItemBeReserved is reduced to a single call to Koha::Item::Availability::Hold->check, mapping ignore_hold_counts to skip_patron_checks. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Reserves.t \ t/db_dependent/Koha/Item/Availability/Hold.t \ t/db_dependent/Koha/Patron/Availability/Hold.t => SUCCESS: Tests pass! 3. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) -- 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/
