Bug 32118

Summary: Clarify expansion/embed modifiers
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: REST APIAssignee: Martin Renvoize <martin.renvoize>
Status: CLOSED FIXED QA Contact: Tomás Cohen Arazi <tomascohen>
Severity: trivial    
Priority: P5 - low CC: kyle, lucas, nick, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33161
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.04
Bug Depends on: 26635    
Bug Blocks:    
Attachments: Bug 32118: Add optional support for `:` as the modifier
Bug 32118: Add optional support for `:` as the modifier

Description Martin Renvoize 2022-11-07 12:06:50 UTC
With bug 26635 we add a new additive function to the embed header options.. +av_expand.. this is a special case in that it's not just pulling in a related object, but also setting a flag to expand coded values and embed them within their own structure.

We also have +relation_count.. to add a single field in a parent structure to just return the 'count' of a relation.. I think we should use :relation_count for this case?
Comment 1 Martin Renvoize 2022-11-07 12:33:27 UTC
Created attachment 143363 [details] [review]
Bug 32118: Add optional support for `:` as the modifier

This patch adds optional support for using `:` as the modifier for
invoking the 'count' method for relations as discussed.

We retain support for `+` for backward compatability to prevent a
breaking change.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 2 Tomás Cohen Arazi 2023-03-13 17:43:38 UTC
Created attachment 148133 [details] [review]
Bug 32118: Add optional support for `:` as the modifier

This patch adds optional support for using `:` as the modifier for
invoking the 'count' method for relations as discussed.

We retain support for `+` for backward compatability to prevent a
breaking change.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Tomás Cohen Arazi 2023-03-14 12:10:30 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 4 Martin Renvoize 2023-03-20 16:52:56 UTC
Many hands makes light work, thankyou everyone!

Pushed to 22.11.x for the next release
Comment 5 Lucas Gass 2023-04-24 16:40:39 UTC
Missing dependencies for 22.05.x, no backport