From d895053d2eb9a14b344bb557bfd4ecf2fbe78089 Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 2 Apr 2026 18:58:10 +0200 Subject: [PATCH] fix: show subtasks in saved filter views regardless of parent presence Add isFilteredView parameter to shouldShowTaskInListView() that skips the parent-hiding logic when viewing tasks through a saved filter. This ensures all filter-matching tasks are shown. Ref: #2494 --- frontend/src/composables/useTaskListFiltering.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frontend/src/composables/useTaskListFiltering.ts b/frontend/src/composables/useTaskListFiltering.ts index 501ed8000..39421094d 100644 --- a/frontend/src/composables/useTaskListFiltering.ts +++ b/frontend/src/composables/useTaskListFiltering.ts @@ -6,14 +6,24 @@ import type {ITask} from '@/modelTypes/ITask' * Subtasks are hidden only when their parent task is also in the current view * (same project). Cross-project subtasks remain visible. * + * In filtered views (saved filters), all tasks are shown regardless of parent + * presence, since the user explicitly filtered for them. + * * @param task - The task to check * @param allTasksInView - All tasks currently visible in the view + * @param isFilteredView - Whether the current view is a saved/custom filter * @returns true if the task should be shown, false if it should be hidden */ export function shouldShowTaskInListView( task: ITask, allTasksInView: ITask[], + isFilteredView: boolean = false, ): boolean { + // In filtered views (saved filters), show all tasks that matched the filter + if (isFilteredView) { + return true + } + // If task has no parent, always show it const parentTasksCount = task.relatedTasks?.parenttask?.length ?? 0 if (parentTasksCount === 0) {