Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains mainly backend changes, separating out a few bits of tidy up ahead of the main changes in EES-5656.
There are two main changes amongst some other smaller improvements.
I attempted to remove
Id
fromReleaseSeriesItem
, thinking that in cases where a publication has no legacy releases it would be nice if theReleaseSeries
field only contained an array of release id's. I backtracked on removing it entirely when I realised it's needed to be able to safely select the chosen legacy release from the release series array in the Admin UI when choosing to 'Edit' a legacy link. I've left in a lot of the changes where it doesn't need to be present though. For example, it's removed fromReleaseSeriesItemViewModel
so it's no longer exposed to the public frontend. It's also removed fromReleaseSeriesItemUpdateRequest
where supplying with each entry in the update made no difference, since we replace all the entries in the old value ofReleaseSeries
with an entirely new set of entries.I changed the building of the view model in
PublicationService.GetReleaseSeries
to be built from aRelease
rather thanReleaseVersion
which is possible now the fieldsTitle
andSlug
have moved toRelease
. This also makes things a bit clearer in test code where we can compare fields in the view model with expected releases, rather than release versions.