]> 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)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 18 Sep 2023 18:31:49 +0000 (15:31 -0300)
commit4ce7ce2a158d9c61ac176660e341b4111e76a2ca
tree1ccd04486ead641878466e8ee8872219a1d12a62
parent23cfdf97e379255139a6a3a73d74ee60f36aa5a2
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>
api/v1/swagger/definitions/hold.yaml
api/v1/swagger/paths/holds.yaml
api/v1/swagger/paths/patrons_holds.yaml