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

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

This patch makes Koha::Patron->can_place_holds a thin wrapper around
Koha::Patron::Availability::Hold->check, instead of duplicating the
same six eligibility checks. The Koha::Result::Boolean contract is
kept: one message per blocker, with the debt_limit and hold_limit
payloads.

Note: a hold group now counts as one hold against maxreserves.

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Patron.t \
           t/db_dependent/api/v1/holds.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Co-authored-by: Martin Renvoize <[email protected]>
Assisted-by: Opus 5.5 (Anthropic)

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