Repository navigation
fix(recurring): keep a series' status unless the status reset is turned on (#2521) - #2522
Merged
Merged
Conversation
…ed on (#2521) Since #2441, any Next status on the first completed status also reset a recurring series' status after each completed or skipped occurrence. Setups that had set Done's Next status only so reopened tasks return to an inbox saw every recurring completion from a status click or the context menu move the task to that status, while the modal's completion calendar left it alone. Make the reset its own setting, "Reset status after each occurrence". It defaults on for new setups and loads off for settings saved before it existed. The recurring status-click cycle from #2492 is gated on it too, so existing setups keep completing an occurrence in one click.
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.
Fixes #2521.
Problem
#2441 (4.16.0) made the Next status of the first completed status also reset a recurring series' status after each completed or skipped occurrence. There was no separate switch, so any setup that already had a Next status on Done got the reset. That's common: setting Done → Next status to an inbox or default status is how reopening a task is configured.
The reporter's setup matches: custom statuses (
inbox,do-next,calendar, …), a recurring task atcalendar. Completing it with a status click on a Kanban card, or with Mark complete or skip → Completed on schedule, both reachTaskService.toggleRecurringTaskComplete, which rewrotestatusto Done's Next status. The edit modal's Completions calendar writescomplete_instancesdirectly and never ran this code, which is why that path kept the status.On
mainit's worse: #2492 (unreleased) gates the recurring status-click cycle on the same Next status, so a Kanban click on the reporter's task would move itcalendar→waitingwithout completing anything.Fix
resetRecurringStatusAfterOccurrence.DEFAULT_SETTINGS, so new setups keep the feat: optionally reset a recurring task's status after each occurrence #2441/feat: let recurring tasks follow the status cycle on click #2492 behaviour, including built-in Done → Open.migrateLoadedSettingsDataloads it asfalsewhen saved settings don't have it, so existing setups keep their recurring statuses.TaskService.getStatusAfterOccurrenceand the feat: let recurring tasks follow the status cycle on click #2492 click cycle intaskCardActionsboth check it.Tests
e2e/issues/issue-2521-recurring-status-reset.spec.tsuses the reporter's statuses (Done → inbox, default inbox) and a task atcalendar, every 2 days, anchored on scheduled. It covers a Kanban status-dot click and the context-menu Completed on schedule: both fail onmain(statusinbox, and the click doesn't complete) and pass with the fix. A third case checks that the reset still applies when the setting is on.TaskServicekeeps the status with the setting off; the status click completes in one click with it off; settings migration (saved data → off, new setup → on).lint,typecheck,build,i18n:check,test:i18n-source,check-docsand the bundle-size check all pass locally.