Bug 34211

Summary: Add +strings for GET /api/v1/biblios/:biblio_id/items
Product: Koha Reporter: Lucas Gass <lucas>
Component: REST APIAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, kebliss, martin.renvoize, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.02,22.11.08
Bug Depends on: 26635    
Bug Blocks: 33568    
Attachments: Bug 34211: Add tests
Bug 34211: Add +strings for GET /api/v1/biblios/:biblio_id/items
Bug 34211: Add +strings for GET /api/v1/biblios/:biblio_id/items
Bug 34211: Add tests
Bug 34211: Add +strings for GET /api/v1/biblios/:biblio_id/items

Description Lucas Gass 2023-07-05 20:14:31 UTC
It would be nice it we could get +strings for this endpoint.
Comment 1 Tomás Cohen Arazi 2023-07-05 20:15:13 UTC
\o/
Comment 2 Jonathan Druart 2023-07-05 20:30:59 UTC
This is done somewhere in bug 33568.
Comment 3 Lucas Gass 2023-07-05 20:50:00 UTC
(In reply to Jonathan Druart from comment #2)
> This is done somewhere in bug 33568.

Great! In that case should we just mark this one as a duplicate?
Comment 4 Jonathan Druart 2023-07-06 06:36:31 UTC
We can, unless it's something you would like to backport. In that case I can extract the relevant part and attach it here. You decide! :)
Comment 5 Tomás Cohen Arazi 2023-07-06 11:23:18 UTC
Put it here!
Comment 6 Jonathan Druart 2023-07-06 12:10:13 UTC
Created attachment 153092 [details] [review]
Bug 34211: Add tests
Comment 7 Jonathan Druart 2023-07-06 12:10:16 UTC
Created attachment 153093 [details] [review]
Bug 34211: Add +strings for GET /api/v1/biblios/:biblio_id/items

Allow to embed stringified version of attributes for the "Get items for
a biblio" endpoint

Test plan:
curl -u koha:koha --request GET 'http://localhost:8081/api/v1/biblios/47/items' --header "Content-Type: application/json" --header "x-koha-embed: +strings" | jq
Comment 8 Lucas Gass 2023-07-06 15:07:29 UTC
Created attachment 153099 [details] [review]
Bug 34211: Add +strings for GET /api/v1/biblios/:biblio_id/items

Allow to embed stringified version of attributes for the "Get items for
a biblio" endpoint

Test plan:
curl -u koha:koha --request GET 'http://localhost:8081/api/v1/biblios/47/items' --header "Content-Type: application/json" --header "x-koha-embed: +strings" | jq

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 9 Nick Clemens (kidclamp) 2023-07-13 15:42:22 UTC
Created attachment 153405 [details] [review]
Bug 34211: Add tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 10 Nick Clemens (kidclamp) 2023-07-13 15:42:25 UTC
Created attachment 153406 [details] [review]
Bug 34211: Add +strings for GET /api/v1/biblios/:biblio_id/items

Allow to embed stringified version of attributes for the "Get items for
a biblio" endpoint

Test plan:
curl -u koha:koha --request GET 'http://localhost:8081/api/v1/biblios/47/items' --header "Content-Type: application/json" --header "x-koha-embed: +strings" | jq

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 11 Tomás Cohen Arazi 2023-07-13 18:21:42 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 12 Martin Renvoize 2023-07-18 11:25:42 UTC
Reading the discussion here, it looks like we already decided to backport this.. who am I to argue ;).
Comment 13 Martin Renvoize 2023-07-18 11:52:29 UTC
Thanks for all the hard work!

Pushed to 23.05.x for the next release
Comment 14 Matt Blenkinsop 2023-07-18 14:23:54 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x