[PR #2676] Fixing issues with subtasks in filtered views. 1. Subtasks that match… #10115

Open
opened 2026-04-23 09:25:03 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/2676
Author: @v-marinkov
Created: 4/21/2026
Status: 🔄 Open

Base: mainHead: main


📝 Commits (2)

  • 25dd410 Fixing issues with subtasks in filtered views. 1. Subtasks that matched a filter were missing if their parent task did not match the filter.
  • 9ddae35 Merge branch 'main' into main

📊 Changes

2 files changed (+4 additions, -3 deletions)

View changed files

📝 frontend/src/components/project/views/ProjectList.vue (+1 -2)
📝 pkg/models/task_search.go (+3 -1)

📄 Description

Fixing the following bugs for subtasks in saved filters:

  1. Subtasks that matched a filter were missing if their parent task did not match the filter. https://github.com/go-vikunja/vikunja/issues/2646
  2. Subtasks that did not match a filter were incorrectly shown if their parent task matched the filter. https://github.com/go-vikunja/vikunja/issues/1786#issuecomment-4287980648
  3. Subtasks were visually duplicated in the list, appearing both nested under their parent and independently at the root level. https://github.com/go-vikunja/vikunja/issues/1786

The core issue stems from how the expand=subtasks logic interacts with filtered views. expand=subtasks was originally designed for unfiltered lists to isolate root tasks and recursively fetch their children. When applied to filtered views, it aggressively stripped out matching subtasks (bug #1) and indiscriminately pulled in non-matching subtasks via its recursive SQL query (bug #2).

Bug #3 was reintroduced after a regression that fixed https://github.com/go-vikunja/vikunja/issues/1786 so the PR reverts back to that fix.

I have tested the app locally and the filtering with subtasks now works perfectly in saved filters. Namely:

  • subtasks show one time as standalone tasks in the filtered view if they fit the filter but their parent doesn't
  • if the parent fits the filter but some subtasks don't, those subtasks are NOT shown
  • if the parent and some of its subtasks match the filter, then the parent is shown and the matching subtasks are shown as subtasks, not standalone tasks. Thus, also the duplicate displaying issue is solved.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/2676 **Author:** [@v-marinkov](https://github.com/v-marinkov) **Created:** 4/21/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`25dd410`](https://github.com/go-vikunja/vikunja/commit/25dd41027614147e5f777a25e8cd42038ca974ec) Fixing issues with subtasks in filtered views. 1. Subtasks that matched a filter were missing if their parent task did not match the filter. - [`9ddae35`](https://github.com/go-vikunja/vikunja/commit/9ddae35dce6bf2ee2c2af48a2e7e1d22d391eba6) Merge branch 'main' into main ### 📊 Changes **2 files changed** (+4 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/project/views/ProjectList.vue` (+1 -2) 📝 `pkg/models/task_search.go` (+3 -1) </details> ### 📄 Description Fixing the following bugs for subtasks in saved filters: 1. Subtasks that matched a filter were missing if their parent task did not match the filter. https://github.com/go-vikunja/vikunja/issues/2646 2. Subtasks that did not match a filter were incorrectly shown if their parent task matched the filter. https://github.com/go-vikunja/vikunja/issues/1786#issuecomment-4287980648 3. Subtasks were visually duplicated in the list, appearing both nested under their parent and independently at the root level. https://github.com/go-vikunja/vikunja/issues/1786 The core issue stems from how the `expand=subtasks` logic interacts with filtered views. `expand=subtasks` was originally designed for unfiltered lists to isolate root tasks and recursively fetch their children. When applied to filtered views, it aggressively stripped out matching subtasks (bug #1) and indiscriminately pulled in non-matching subtasks via its recursive SQL query (bug #2). Bug #3 was reintroduced after a regression that fixed https://github.com/go-vikunja/vikunja/issues/1786 so the PR reverts back to that fix. I have tested the app locally and the filtering with subtasks now works perfectly in saved filters. Namely: - subtasks show one time as standalone tasks in the filtered view if they fit the filter but their parent doesn't - if the parent fits the filter but some subtasks don't, those subtasks are NOT shown - if the parent and some of its subtasks match the filter, then the parent is shown and the matching subtasks are shown as subtasks, not standalone tasks. Thus, also the duplicate displaying issue is solved. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 09:25:03 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#10115