]> git.koha-community.org Git - koha.git/commit
Bug 34333: Add embed option for `cancellation_requested` for holds
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 20 Jul 2023 23:18:27 +0000 (20:18 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 18 Sep 2023 21:42:11 +0000 (11:42 -1000)
commite916ec22ddf50aa3007f68bfdb87b087070b2354
tree8970da17fb2bf3809d240d23e2de1f243d5baa68
parente932dc8372310eda321c4d473053c0c4d211cfd6
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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4ce7ce2a158d9c61ac176660e341b4111e76a2ca)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
api/v1/swagger/definitions/hold.yaml
api/v1/swagger/paths/holds.yaml
api/v1/swagger/paths/patrons_holds.yaml