fix: exclude cancelled tasks from Overdue and Due Today sections (#1007)

Fixes #997

- Add Task.STATUS.CANCELLED to exclusion list in fetchOverdueTasks()
- Add Task.STATUS.CANCELLED to exclusion list in fetchTasksDueToday()
- Cancelled tasks now properly filtered out from Today page sections
- All existing tests pass
This commit is contained in:
Chris 2026-04-12 09:10:22 +03:00 committed by GitHub
parent 50eb12d7ec
commit e0769e4b25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -179,8 +179,10 @@ async function fetchTasksDueToday(visibleTasksWhere, userTimezone) {
[Op.notIn]: [
Task.STATUS.DONE,
Task.STATUS.ARCHIVED,
Task.STATUS.CANCELLED,
'done',
'archived',
'cancelled',
...TODAY_PLAN_STATUSES,
],
},
@ -227,8 +229,10 @@ async function fetchOverdueTasks(visibleTasksWhere, userTimezone) {
[Op.notIn]: [
Task.STATUS.DONE,
Task.STATUS.ARCHIVED,
Task.STATUS.CANCELLED,
'done',
'archived',
'cancelled',
// Exclude tasks in today plan (they show in Planned section)
...TODAY_PLAN_STATUSES,
],