https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42386 --- Comment #92 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 209847 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209847&action=edit Bug 42386: Add Koha::Item::Availability::Hold This patch adds item-level hold availability checks. Patron-level count checks are chained after the item checks, matching the legacy CanItemBeReserved check order. Checks performed (in order): - cannot_reserve_from_other_branches (IndependentBranches) - damaged - age_restricted - item_already_on_hold - already_possession (any item of the same record) - recall - no_reserves_allowed (reservesallowed == 0, policy not count) - Patron-level counts (Koha::Patron::Availability::Hold) - not_reservable, cannot_reserve_from_other_branches, branch_not_in_hold_group (holdallowed) - Pickup location: library_not_pickup_location, cannot_be_transferred, pickup_not_in_hold_group Parameters: - skip_patron_checks skips the patron checks and item_already_on_hold, as the legacy ignore_hold_counts did (used to check whether an item can fill a hold the patron already placed) - skip_eligibility_checks skips only the patron eligibility gates Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Item/Availability/Hold.t \ t/db_dependent/Koha/Patron/Availability/Hold.t => SUCCESS: Tests pass! 3. Sign off :-D Co-authored-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Assisted-by: Opus 5.5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.