From e0769e4b25a4836dc3e162fa85fab7ef3098c696 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 12 Apr 2026 09:10:22 +0300 Subject: [PATCH] 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 --- backend/modules/tasks/queries/metrics-queries.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/modules/tasks/queries/metrics-queries.js b/backend/modules/tasks/queries/metrics-queries.js index 83536ad..ccb3881 100644 --- a/backend/modules/tasks/queries/metrics-queries.js +++ b/backend/modules/tasks/queries/metrics-queries.js @@ -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, ],