Bug 38390

Summary: Add 'subscriptions+count' embed to vendors endpoint
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: REST APIAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: Needs documenting --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, kyle, lucas, matt.blenkinsop, testopia, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
**Sponsored by** *PTFS Europe* and *ByWater Solutions*
Version(s) released in:
24.11.00,24.05.06
Circulation function:
Bug Depends on: 38011    
Bug Blocks: 38010    
Attachments: Bug 38390: Add subscriptions+count to vendors embed
Bug 38390: Add subscriptions+count to vendors embed
Bug 38390: Add subscriptions+count to vendors embed

Description Martin Renvoize (ashimema) 2024-11-07 12:55:08 UTC
This was created as a need for the Vendors Vue rework.. we initially tried to go all the way and allow embedding 'subscriptions', but that proved a larger piece of work.

For the Vendors UI we only actually need the count of subscriptions for now so we can just embed that.
Comment 1 Martin Renvoize (ashimema) 2024-11-07 13:14:49 UTC
Created attachment 174192 [details] [review]
Bug 38390: Add subscriptions+count to vendors embed

This patch adds the subscriptions+count option to the embeddable enum
for the /vendors endpoint.

Test plan
1) Inspect the change to t/db_dependant/api/v1/acquisitions_vendors.t
   and confirm it's testing for the addition of subscriptions_count.
2) Run the above tests and confirm it passes

Note: For the above tests to pass, you will need to ensure your api
bundle is rebuilt after the patches are applied and restart plack.
`yarn build && restart_all` in ktd
Comment 2 Matt Blenkinsop 2024-11-07 14:09:47 UTC
Created attachment 174238 [details] [review]
Bug 38390: Add subscriptions+count to vendors embed

This patch adds the subscriptions+count option to the embeddable enum
for the /vendors endpoint.

Test plan
1) Inspect the change to t/db_dependant/api/v1/acquisitions_vendors.t
   and confirm it's testing for the addition of subscriptions_count.
2) Run the above tests and confirm it passes

Note: For the above tests to pass, you will need to ensure your api
bundle is rebuilt after the patches are applied and restart plack.
`yarn build && restart_all` in ktd

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 3 Tomás Cohen Arazi (tcohen) 2024-11-11 15:15:34 UTC
Created attachment 174361 [details] [review]
Bug 38390: Add subscriptions+count to vendors embed

This patch adds the subscriptions+count option to the embeddable enum
for the /vendors endpoint.

Test plan
1) Inspect the change to t/db_dependant/api/v1/acquisitions_vendors.t
   and confirm it's testing for the addition of subscriptions_count.
2) Run the above tests and confirm it passes

Note: For the above tests to pass, you will need to ensure your api
bundle is rebuilt after the patches are applied and restart plack.
`yarn build && restart_all` in ktd

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Katrin Fischer 2024-11-11 16:44:05 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 5 Lucas Gass (lukeg) 2024-12-05 22:19:51 UTC
Backported to 24.05.x for upcoming 24.05.06
Comment 6 Fridolin Somers 2024-12-18 13:14:47 UTC
Note that Bug 38011 not in 24.05.x

Not backported to 23.11.x