Bug 39816

Summary: Allow embedding `late_since_days`in baskets
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: REST APIAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: brendan, emmi.takkinen, Laura.escamilla, lucas, tomascohen
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 32266    
Attachments: Bug 39816: Allow embedding `late_since_days` in baskets
Bug 39816: (follow-up) Harmonize embeds in baskets
Bug 39816: Allow embedding `late_since_days` in baskets
Bug 39816: (follow-up) Harmonize embeds in baskets
Bug 39816: Allow embedding `late_since_days` in baskets
Bug 39816: (follow-up) Harmonize embeds in baskets

Description Tomás Cohen Arazi (tcohen) 2025-05-02 13:13:02 UTC
Some places, like the late orders table, display this info.
Comment 1 Tomás Cohen Arazi (tcohen) 2025-05-02 17:20:31 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi (tcohen) 2025-05-02 17:20:33 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi (tcohen) 2025-05-02 17:31:17 UTC
Created attachment 181881 [details] [review]
Bug 39816: Allow embedding `late_since_days` in baskets

This patch adds the option to embed the return value of the
`late_since_days` method in basket objects in the REST API.

It does so by just adding it to the list of embeds in the spec. It is
added in every place baskets can be returned.
Comment 4 Tomás Cohen Arazi (tcohen) 2025-05-02 17:31:34 UTC
Created attachment 181882 [details] [review]
Bug 39816: (follow-up) Harmonize embeds in baskets

As I traversed the REST API spec to add the `late_since_days` embed
option, I noticed an inconsistency in the embed options we defined in
each place a basket is to be returned.

This patch makes all the places have the same embed options.
Comment 5 Emmi Takkinen 2025-05-08 06:28:01 UTC
Patch doesn't apply:

Applying: Bug 39816: Allow embedding `late_since_days` in baskets
Using index info to reconstruct a base tree...
M	api/v1/swagger/definitions/basket.yaml
M	api/v1/swagger/paths/acquisitions_baskets.yaml
M	api/v1/swagger/paths/acquisitions_orders.yaml
Falling back to patching base and 3-way merge...
Auto-merging api/v1/swagger/paths/acquisitions_orders.yaml
Auto-merging api/v1/swagger/paths/acquisitions_baskets.yaml
CONFLICT (content): Merge conflict in api/v1/swagger/paths/acquisitions_baskets.yaml
Auto-merging api/v1/swagger/definitions/basket.yaml
CONFLICT (content): Merge conflict in api/v1/swagger/definitions/basket.yaml
error: Failed to merge in the changes.
Patch failed at 0001 Bug 39816: Allow embedding `late_since_days` in baskets
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-39816-Allow-embedding-latesincedays-in-baskets-7u_k12.patch
Comment 6 Tomás Cohen Arazi (tcohen) 2025-05-08 11:54:43 UTC
Created attachment 182069 [details] [review]
Bug 39816: Allow embedding `late_since_days` in baskets

This patch adds the option to embed the return value of the
`late_since_days` method in basket objects in the REST API.

It does so by just adding it to the list of embeds in the spec. It is
added in every place baskets can be returned.
Comment 7 Tomás Cohen Arazi (tcohen) 2025-05-08 11:55:06 UTC
Created attachment 182070 [details] [review]
Bug 39816: (follow-up) Harmonize embeds in baskets

As I traversed the REST API spec to add the `late_since_days` embed
option, I noticed an inconsistency in the embed options we defined in
each place a basket is to be returned.

This patch makes all the places have the same embed options.