From 5e69ee43fd734ed17f057be64aa12da1aa3fbbdf Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 18 Feb 2026 21:47:38 +0100 Subject: [PATCH] feat(gantt): update API filter to fetch tasks with due_date or end_date --- frontend/src/views/project/helpers/useGanttFilters.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/project/helpers/useGanttFilters.ts b/frontend/src/views/project/helpers/useGanttFilters.ts index c4104ef3f..af199615c 100644 --- a/frontend/src/views/project/helpers/useGanttFilters.ts +++ b/frontend/src/views/project/helpers/useGanttFilters.ts @@ -87,10 +87,17 @@ function ganttFiltersToRoute(filters: GanttFilters): RouteLocationRaw { } function ganttFiltersToApiParams(filters: GanttFilters): TaskFilterParams { + const dateFrom = isoToKebabDate(filters.dateFrom) + const dateTo = isoToKebabDate(filters.dateTo) + return { sort_by: ['start_date', 'done', 'id'], order_by: ['asc', 'asc', 'desc'], - filter: 'start_date >= "' + isoToKebabDate(filters.dateFrom) + '" && start_date <= "' + isoToKebabDate(filters.dateTo) + '"', + filter: '(' + + '(start_date >= "' + dateFrom + '" && start_date <= "' + dateTo + '") || ' + + '(end_date >= "' + dateFrom + '" && end_date <= "' + dateTo + '") || ' + + '(due_date >= "' + dateFrom + '" && due_date <= "' + dateTo + '")' + + ')', filter_include_nulls: filters.showTasksWithoutDates, } }