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

--- Comment #1 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 198769
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198769&action=edit
Bug 42386: Add Koha::Item::Availability::Hold

Adds item-level hold availability checks following the
Koha::Result::Availability pattern established in Bug 41728.

Uses a hashref signature: check({ item => ..., patron => ..., ... })

Checks performed:
- IndependentBranches restriction
- Damaged item (AllowHoldsOnDamagedItems)
- Age restriction (via Koha::Patron->meets_age_restriction)
- Item already on hold by patron
- Patron has item checked out (AllowHoldsOnPatronsPossessions)
- Active recall on item
- Hold policy (holdallowed: not_allowed, from_home_library,
  from_local_hold_group)
- Pickup location validation (libraryNotPickupLocation,
  cannotBeTransferred, pickupNotInHoldGroup)

Supports no_short_circuit for collecting all blockers.

Assisted-by: Sonnet 4.6 (Anthropic)

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
   k$ prove t/db_dependent/Koha/Item/Availability/Hold.t
=> SUCCESS: Tests pass!
3. Sign off :-D

-- 
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/

Reply via email to