* fix: correct bi-weekly recurring task scheduling for multi-day patterns Fixes #1004 Previously, when a recurring task was set to repeat every N weeks (where N > 1) on multiple weekdays that span a week boundary (e.g., Saturday + Sunday), the algorithm incorrectly calculated the next occurrence dates. The issue was in the calculateWeeklyRecurrence function, which didn't properly determine when to add the interval skip for multi-weekday patterns. It would: - Correctly handle Sat -> Sun (adjacent days, same cycle) - Incorrectly handle Sun -> Sat (should skip weeks, but didn't) This fix improves the logic to: 1. Detect when the current day is the last weekday in the pattern cycle 2. Account for Sunday (day 0) wrapping around in the day-of-week numbering 3. Only add interval skips when truly moving to a new cycle, not when moving between weekdays within the same cycle Test coverage added for: - Bi-weekly Saturday + Sunday pattern (the reported bug) - Starting from different days in the pattern - Bi-weekly Tuesday + Thursday pattern - Tri-weekly Friday + Saturday + Sunday pattern * docs: update MEMORY.md with GitHub template requirements - Add detailed PR template requirements and structure - Expand bug report template requirements with all fields - Update last modified date |
||
|---|---|---|
| .. | ||
| core | ||
| middleware | ||
| operations | ||
| queries | ||
| utils | ||
| attachments.js | ||
| deferredTaskService.js | ||
| dueTaskService.js | ||
| events.js | ||
| index.js | ||
| recurringTaskService.js | ||
| repository.js | ||
| routes.js | ||
| taskEventService.js | ||
| taskScheduler.js | ||
| taskSummaryService.js | ||