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

--- Comment #6 from Matt Blenkinsop <[email protected]> ---
Created attachment 204008
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204008&action=edit
Bug 43126: Add an endpoint to test biblio hold availability

Adds GET /biblios/{biblio_id}/holdability, which replaces a CanBookBeReserved
call followed by a loop over the record's items. The response carries the
verdict and a count of how many items could fill the hold.

Adds a summarise_items option to Koha::Biblio::Availability::Hold->check for
that count. It is off by default, so a caller that only needs a yes or no keeps
the early return.

Koha::Item::Availability::Hold also fetched the reservesallowed rule object
before the block that reads it, so a caller skipping the count checks paid for
that query once per item and discarded the answer. It now runs where it is
used.

Assisted-by: Sonnet 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