Fix calculateInitialDueDate() to properly handle recurrence_weekdays array when creating or updating weekly recurring tasks with multiple weekdays. Previously, the function only checked for recurrence_weekday (singular) and ignored recurrence_weekdays (plural array), causing tasks with multiple weekdays to incorrectly get today's date instead of the next occurrence. Changes: - Add support for recurrence_weekdays array in calculateInitialDueDate() - Fix buildUpdateAttributes() to pass recurrence_weekdays parameter - Add 8 unit tests covering multiple weekdays scenarios - Add 3 integration tests for API CREATE and UPDATE operations - Maintain backward compatibility with single recurrence_weekday The fix mirrors the proven logic from calculateWeeklyRecurrence() in recurringTaskService.js and properly handles edge cases like unsorted arrays, wrapping to next week, and JSON string parsing. Fixes #974 |
||
|---|---|---|
| .. | ||
| middleware | ||
| models | ||
| modules/tasks | ||
| services | ||
| shared | ||
| utils | ||