]> 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)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Thu, 12 Oct 2023 16:00:19 +0000 (16:00 +0000)
commite5a8ec34f297be92abf2d561c9243e8ac22fb078
tree2f4f8ac6cfd4f77403f0950e3180e00c6b6cba9c
parent95e9d2c3bc569116ae6649ac30f3b9bae1094f98
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>
(cherry picked from commit e916ec22ddf50aa3007f68bfdb87b087070b2354)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
api/v1/swagger/definitions/hold.yaml
api/v1/swagger/paths/holds.yaml
api/v1/swagger/paths/patrons_holds.yaml