[Koha-bugs] [Bug 34333] Add cancellation request information embed option to the holds endpoint

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jul 21 02:00:44 CEST 2023


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

--- Comment #2 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 153745
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153745&action=edit
Bug 34333: Add embed option for `cancellation_requested` for holds

This patch adds the `cancellation_requested` attribute to the hold
object definition, and allows embeding it as on the different holds
endpoints that migt be useful.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Hold.t \
           t/db_dependent/api/v1/*holds.t
=> SUCCESS: Tests pass!
3. Play with your REST tool (Postman?) on the following endpoints:
   GET http://localhost:8081/api/v1/holds
   GET http://localhost:8081/api/v1/patrons/:patron_id/holds
on both, pass and not pass the `x-koha-embed` header with
`cancellation_requested` on it.
=> SUCCESS: It is easy! You see the attribute and you don't, and the
content makes sense!
4. Sign off :-D

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list