fix: show tasks spanning entire gantt date range

Tasks whose start date is before and end date is after the visible
gantt range were not shown because the API filter only checked whether
individual date fields fell within the range. Add a fourth filter
clause to match tasks that fully encompass the visible date range.

Fixes go-vikunja/vikunja#2269
This commit is contained in:
kolaente
2026-02-24 11:51:13 +01:00
parent a13ecbd3cc
commit 56eb5d3740

View File

@@ -96,7 +96,8 @@ function ganttFiltersToApiParams(filters: GanttFilters): TaskFilterParams {
filter: '(' +
'(start_date >= "' + dateFrom + '" && start_date <= "' + dateTo + '") || ' +
'(end_date >= "' + dateFrom + '" && end_date <= "' + dateTo + '") || ' +
'(due_date >= "' + dateFrom + '" && due_date <= "' + dateTo + '")' +
'(due_date >= "' + dateFrom + '" && due_date <= "' + dateTo + '") || ' +
'(start_date <= "' + dateFrom + '" && end_date >= "' + dateTo + '")' +
')',
filter_include_nulls: filters.showTasksWithoutDates,
}