Bug 32118 - Clarify expansion/embed modifiers
Summary: Clarify expansion/embed modifiers
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Martin Renvoize (ashimema)
QA Contact: Tomás Cohen Arazi (tcohen)
URL:
Keywords:
Depends on: 26635
Blocks:
  Show dependency treegraph
 
Reported: 2022-11-07 12:06 UTC by Martin Renvoize (ashimema)
Modified: 2023-12-28 20:42 UTC (History)
4 users (show)

See Also:
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
Circulation function:


Attachments
Bug 32118: Add optional support for `:` as the modifier (2.06 KB, patch)
2022-11-07 12:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 32118: Add optional support for `:` as the modifier (2.12 KB, patch)
2023-03-13 17:43 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 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 (ashimema) 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 (tcohen) 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 (tcohen) 2023-03-14 12:10:30 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 4 Martin Renvoize (ashimema) 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 (lukeg) 2023-04-24 16:40:39 UTC
Missing dependencies for 22.05.x, no backport