Bug 37809

Summary: Add missing embeds to checkouts endpoints
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: REST APIAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: Pushed to stable --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: enhancement    
Priority: P5 - low CC: hdlaurent, katrin.fischer, lucas, martin.renvoize, nick, s.graham4, tomascohen
Version: unspecifiedKeywords: rel_24_05_candidate
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:
Attachments: Bug 37809: Add more embed options to checkouts endpoints
Bug 37809: (follow-up) Add wrong embed
Bug 37809: (follow-up) Remove wrong embed
Bug 37809: (follow-up) Allow embedding item.biblio too
Bug 37809: Add more embed options to checkouts endpoints
Bug 37809: (follow-up) Remove wrong embed
Bug 37809: (follow-up) Allow embedding item.biblio too

Description Tomás Cohen Arazi (tcohen) 2024-09-02 14:47:32 UTC

    
Comment 1 Tomás Cohen Arazi (tcohen) 2024-09-02 15:02:38 UTC
Created attachment 170949 [details] [review]
Bug 37809: Add more embed options to checkouts endpoints

This patch adds more embed options to checkouts endpoints.
To test you really need to try them on a REST tool.

* patron
* item
* library

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Tomás Cohen Arazi (tcohen) 2024-09-02 15:02:40 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi (tcohen) 2024-09-02 17:28:17 UTC
Created attachment 170952 [details] [review]
Bug 37809: (follow-up) Remove wrong embed

It seems to me like a copy and paste error coming from the holds
endpoint.

To test:
1. Use a REST API tool like Postman to ask for some patron's checkouts
2. Add x-koha-emebed: cancellation_requested
=> FAIL: It explodes, cannot embed it
3. Apply this patch
4. Repeat 2
=> SUCCESS: cancellation_requested no longer a valid option
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Tomás Cohen Arazi (tcohen) 2024-09-02 17:28:45 UTC
Comment on attachment 170950 [details] [review]
Bug 37809: (follow-up) Add wrong embed

s/Add/Remove/
Comment 5 Tomás Cohen Arazi (tcohen) 2024-09-03 19:38:49 UTC
Created attachment 170999 [details] [review]
Bug 37809: (follow-up) Allow embedding item.biblio too

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Tomás Cohen Arazi (tcohen) 2024-09-03 19:41:38 UTC
*** Bug 34701 has been marked as a duplicate of this bug. ***
Comment 7 Martin Renvoize (ashimema) 2024-11-06 17:08:56 UTC
Created attachment 174086 [details] [review]
Bug 37809: Add more embed options to checkouts endpoints

This patch adds more embed options to checkouts endpoints.
To test you really need to try them on a REST tool.

* patron
* item
* library

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize (ashimema) 2024-11-06 17:08:59 UTC
Created attachment 174087 [details] [review]
Bug 37809: (follow-up) Remove wrong embed

It seems to me like a copy and paste error coming from the holds
endpoint.

To test:
1. Use a REST API tool like Postman to ask for some patron's checkouts
2. Add x-koha-emebed: cancellation_requested
=> FAIL: It explodes, cannot embed it
3. Apply this patch
4. Repeat 2
=> SUCCESS: cancellation_requested no longer a valid option
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Martin Renvoize (ashimema) 2024-11-06 17:09:01 UTC
Created attachment 174088 [details] [review]
Bug 37809: (follow-up) Allow embedding item.biblio too

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize (ashimema) 2024-11-06 17:09:40 UTC
Nice simple patch with a great enhancement.

No regressions..

Passing QA straight!
Comment 11 Katrin Fischer 2024-11-11 13:15:37 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 12 Lucas Gass (lukeg) 2024-12-05 21:24:15 UTC
Enhancement, no 24.05.x backport.
Comment 13 Nick Clemens (kidclamp) 2025-01-15 17:24:40 UTC
While technically an enhancement, the 'cancellation_requested' embed before these patches is a bug - please reconsider for backport?