Skip to content

fix(recurring): keep a series' status unless the status reset is turned on (#2521) - #2522

Merged
callumalpass merged 1 commit into
mainfrom
fix/2521-recurring-status-reset
Nov 8, 2026
Merged

callumalpass merged 1 commit into
mainfrom
fix/2521-recurring-status-reset

Conversation

@callumalpass

Copy link
Copy Markdown
Owner

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 at calendar. Completing it with a status click on a Kanban card, or with Mark complete or skip → Completed on schedule, both reach TaskService.toggleRecurringTaskComplete, which rewrote status to Done's Next status. The edit modal's Completions calendar writes complete_instances directly and never ran this code, which is why that path kept the status.

On main it'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 it calendar → waiting without completing anything.

Fix

Tests

  • e2e/issues/issue-2521-recurring-status-reset.spec.ts uses the reporter's statuses (Done → inbox, default inbox) and a task at calendar, every 2 days, anchored on scheduled. It covers a Kanban status-dot click and the context-menu Completed on schedule: both fail on main (status inbox, 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.
  • The existing feat: optionally reset a recurring task's status after each occurrence #2441 and feat: let recurring tasks follow the status cycle on click #2492 e2e specs now turn the setting on, and pass (9/9 across the three specs, Obsidian 1.15.0 under xvfb).
  • Unit tests: TaskService keeps the status with the setting off; the status click completes in one click with it off; settings migration (saved data → off, new setup → on).
  • Full Jest suite (6045 passed), lint, typecheck, build, i18n:check, test:i18n-source, check-docs and the bundle-size check all pass locally.

…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.
@callumalpass
callumalpass merged commit 8ae35fa into main Nov 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Marking a recurring task complete for the current date resets Status to default

1 participant