Consistently open the next future period in the picasso#7427
Merged
carlobeltrame merged 2 commits intoecamp:develfrom May 18, 2025
Merged
Consistently open the next future period in the picasso#7427carlobeltrame merged 2 commits intoecamp:develfrom
carlobeltrame merged 2 commits intoecamp:develfrom
Conversation
b683b5d to
f94a559
Compare
Otherwise some of the camps would become past camps, making the e2e tests fail because they do not show up any more by default on the camp list
ca33a3c to
4700808
Compare
The default ordering by createTime DESC had to be removed for this to take effect. As a side effect, content types are also ordered correctly according to name ASC now, as we specify on the entity class.
4700808 to
9c642c1
Compare
pmattmann
approved these changes
May 16, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Based on #7431 so the e2e tests can pass, only review the second commit here.
When fetching periods via the
/periodsendpoint, they were ordered bycreateTime DESC. This is different from fetching the periods of a specific camp, where they were ordered bystart ASC. As a result, the firstFuturePeriod, i.e. the period displayed by default when navigating to the picasso, may be different depending on whether the last reload was on the camp list or the dashboard.Simply adding the
order:entry to the ApiResource annotation was not enough: It made the SQL order bycreateTime DESC, start ASC, which is unhelpful.So I had to remove the default ordering. Not sure if this is a bug or a feature of API Platform.
As a side effect, now the content types are correctly ordered by name too.