[Bug 43126] New: REST API: add holdability endpoints for biblios, items and patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43126 Bug ID: 43126 Summary: REST API: add holdability endpoints for biblios, items and patrons Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: tomascohen@gmail.com Depends on: 43124 Blocks: 43123 Target Milestone: --- Add new REST endpoints built on Koha::Biblio::Availability::Hold and Koha::Item::Availability::Hold (bug 43124). GET /biblios/{biblio_id}/holdability, a single call biblio level holdability verdict plus an item availability summary, replacing the current CanBookBeReserved plus per-item loop pattern. GET /items/{item_id}/holdability, a per-item holdability verdict. Pickup locations are only included when include_pickup_locations=true is passed. POST /biblios/{biblio_id}/holdability/batch, checks holdability for multiple patrons (club holds) or multiple items in a single call. GET /patrons/{patron_id}/hold_eligibility, patron level blockers (debt, restricted, expired, etc) independent of any specific biblio. This is a thin new controller action over the existing Koha::Patron->can_place_holds method, not new backend logic. Also enhance the existing GET /biblios/{biblio_id}/items endpoint with an optional holdability parameter that embeds a per-item holdability object when true and a patron_id is supplied, alongside pagination. Response bodies for the new holdability endpoints serialise the blockers, confirmations and warnings shape of Koha::Result::Availability rather than a bespoke status enum schema. All existing hold endpoints (POST /holds, PATCH and DELETE /holds/{hold_id}, pickup_locations endpoints, suspension_bulk, cancellation_bulk) are unchanged. Test plan 1. Add OpenAPI definitions for each new endpoint under api/v1/swagger. 2. Add controller tests under t/db_dependent/api/v1 for each endpoint, covering holdable, non-holdable and override-required cases. 3. Confirm GET /biblios/{biblio_id}/holdability for a 100 item biblio completes in well under 1 second and issues a small, roughly constant number of queries. 4. Confirm existing hold endpoints are unaffected. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43123 [Bug 43123] Hold placement workflow: Vue modernisation (epic) https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43124 [Bug 43124] Add Koha::Item::Availability::Hold and Koha::Biblio::Availability::Hold -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43126 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43127 Blocks| |43128 Blocks|43123 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43123 [Bug 43123] Hold placement workflow: Vue modernisation https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43127 [Bug 43127] Vue holds module: scaffolding and Express bib-level hold workflow https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43128 [Bug 43128] Vue holds: granular item-level, club and multi-biblio hold workflow -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43126 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Sponsorship status|--- |Sponsored Status|NEW |ASSIGNED Initiative type|--- |Feature Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43126 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |42386 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42386 [Bug 42386] Unify hold availability checks into Koha::Availability pattern -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43126 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|42386 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42386 [Bug 42386] Unify hold availability checks into Koha::Availability pattern -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43126 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matt.blenkinsop@openfifth.c | |o.uk Assignee|martin.renvoize@openfifth.c |matt.blenkinsop@openfifth.c |o.uk |o.uk -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org