-
Notifications
You must be signed in to change notification settings - Fork 62
Reload schedule entries when changing the numbering style of an activity #8001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reload schedule entries when changing the numbering style of an activity #8001
Conversation
⛔ Feature branch deployment currently inactive.If the PR is still open, you can add the |
| return scheduleEntry.period().scheduleEntries().$reload() | ||
| }) | ||
| ) | ||
| this.loadScheduleEntry() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this really needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Since fcb536f we explicitly switched from a computed to local state + watcher for the scheduleEntry in this component. Reason was that this way it's more robust when deleting the schedule entry, see #4975 where this change was implemented.
I just tried again to remove this line, and the sidebar day picasso is updated, but in the main content card's title bar the numbering scheme is not updated.
| async reloadAllScheduleEntriesInRelatedPeriods() { | ||
| await Promise.all( | ||
| this.activity.scheduleEntries().items.map((scheduleEntry) => { | ||
| return scheduleEntry.period().scheduleEntries().$reload() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just as info:
Like this the scheduleEntries of a period might be loaded multiple times.
(hal-json-vuex catches this, but just as info)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 61b88b9
This is a bugfix for the following scenario: - Load the picasso - Open the activity detail of an activity - Change the activity's category to one with a different numbering style Expected outcome: All displayed instances of the schedule entry show the schedule entry number change, and all schedule entries at all times have the correct up-to-date schedule entry number. Actual outcome: The color of the edited schedule entry changes, but the schedule entry number on the top left remains unchanged. Also, when navigating back to the picasso, the schedule entry numbering of other schedule entries is outdated.
1d84370 to
61b88b9
Compare
This is a bugfix for the following scenario:
Expected outcome: All displayed instances of the schedule entry show the schedule entry number change, and all schedule entries at all times have the correct up-to-date schedule entry number.
Actual outcome: The color of the edited schedule entry changes, but the schedule entry number on the top left remains unchanged. Also, when navigating back to the picasso, the schedule entry numbering of other schedule entries is outdated.