Skip to content

Add variancy information to reference response model#18645

Merged
nikolajlauridsen merged 4 commits intov15/devfrom
v15/task/add-variancy-to-ReferenceResponseModel
Mar 24, 2025
Merged

Add variancy information to reference response model#18645
nikolajlauridsen merged 4 commits intov15/devfrom
v15/task/add-variancy-to-ReferenceResponseModel

Conversation

@Migaroez
Copy link
Contributor

@Migaroez Migaroez commented Mar 11, 2025

Task description

The *ReferenceResponseModel does not follow the same structure as an Item-model, especially around the name/state, where we for documents have all the variant names available on items.

In the front end, we would like to show the name/state of the current active variant which we currently do based on the variants array.

Approach

Since this mostly an output/client requirement, I decided to use existing domain logic that can fetch the additional data from a cached repository and combine it in the PresentationFactory.

A better solution will be able to be build once we make media and members variant so this information is relevant to all tracked references/relation types in the system and thus the repository queries can be updated to include this extra information

Testing

Create some documents and media with pickers and pick the different items on each other.
Query the endpoint. If an item is picked by a document, then that documents status and culture should be returned in the output

@Migaroez Migaroez changed the base branch from contrib to v15/dev March 11, 2025 14:55
@Migaroez Migaroez marked this pull request as ready for review March 18, 2025 09:20
Copy link
Contributor

@nikolajlauridsen nikolajlauridsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nitpicks, otherwise looks good 👍

Copy link
Contributor

@nikolajlauridsen nikolajlauridsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments