Skip to content

fix(calendar): narrow recurring reschedule-clear rule for scheduled-anchored tasks - #35

Merged
callumalpass merged 1 commit into
mainfrom
fix/2691-narrow-reschedule-clear
Nov 26, 2026
Merged

callumalpass merged 1 commit into
mainfrom
fix/2691-narrow-reschedule-clear

Conversation

@callumalpass

Copy link
Copy Markdown
Owner

Summary

Narrows the recurring reschedule-clear rule in planCalendarEdit for scheduled-anchored recurring tasks (TaskNotes #2691):

  • Previously, moving a recurring task's scheduled date cleared every completed and skipped instance on or after the new date, wiping unrelated occurrences' history even when the moved occurrence kept its rule identity in recurrence_original_date.
  • For scheduled-anchored recurring tasks:
    • Moves that carry a rule identity (recurrence_original_date, including returning to the original date) clear nothing.
    • Moves without a recurrence_original_date (such as Google-synced or legacy off-pattern notes) clear only the landing day when it is already recorded in complete_instances or skipped_instances, leaving earlier and later history intact.
  • Completion-anchored recurring tasks keep the existing >= new date clearing behavior.

Testing

  • Updated daily-next-pattern-and-instance-state in fixtures/calendar/scenarios.json.
  • Added test/calendar-reschedule-clear.test.mjs covering scheduled-anchored native moves, already-moved/returned occurrences, Google-synced tasks, legacy off-pattern notes, and completion-anchored tasks.
  • npm run typecheck, npm test (155/155 passing), and npm run test:package all pass.

Refs callumalpass/tasknotes#2691

@callumalpass
callumalpass merged commit 3b33d6a into main Nov 26, 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.

1 participant