Skip to content

Fixing issues with subtasks in filtered views. 1. Subtasks that match…#2676

Open
v-marinkov wants to merge 3 commits into
go-vikunja:mainfrom
v-marinkov:main
Open

Fixing issues with subtasks in filtered views. 1. Subtasks that match…#2676
v-marinkov wants to merge 3 commits into
go-vikunja:mainfrom
v-marinkov:main

Conversation

@v-marinkov
Copy link
Copy Markdown

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. Subtasks not shown in custom filters if parent does not match #2646
  2. Subtasks that did not match a filter were incorrectly shown if their parent task matched the filter. Project "New Saved Filter" View | Duplicates Subtasks #1786 (comment)
  3. Subtasks were visually duplicated in the list, appearing both nested under their parent and independently at the root level. Project "New Saved Filter" View | Duplicates Subtasks #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 #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.

…ed a filter were missing if their parent task did not match the filter.

2. Subtasks that did not match a filter were incorrectly shown if their parent task matched the filter.
3. Subtasks were visually duplicated in the list, appearing both nested under their parent and independently at the root level.
@github-actions github-actions Bot added area/filters Filter syntax, saved filters, filter presets, query DSL area/subtasks Subtask hierarchy, indentation, ordering, collapse concern/regression Worked in a prior release, now broken labels Apr 21, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 21, 2026

Preview Deployment

Preview deployments for this PR are available at:

URL Tag Commit
https://pr-2676.preview.vikunja.dev ghcr.io/go-vikunja/vikunja:pr-2676 latest
https://sha-220af19a3925ee661181100d299b78f1d918fa72.preview.vikunja.dev ghcr.io/go-vikunja/vikunja:sha-220af19a3925ee661181100d299b78f1d918fa72 220af19
https://sha-49ac0348e46df227bcd9cdf826b279dac835bf50.preview.vikunja.dev ghcr.io/go-vikunja/vikunja:sha-49ac0348e46df227bcd9cdf826b279dac835bf50 49ac034
https://sha-0b2b5b580d0b6031842ba727e3aa0d45803fd723.preview.vikunja.dev ghcr.io/go-vikunja/vikunja:sha-0b2b5b580d0b6031842ba727e3aa0d45803fd723 0b2b5b5

The preview environment will start automatically on first visit. Subsequent pushes to this PR will update the pr-2676 image — the preview picks up the new version on restart. The per-commit URLs point to a specific version and will not change.

Run locally with Docker
docker pull ghcr.io/go-vikunja/vikunja:pr-2676
docker run -p 3456:3456 ghcr.io/go-vikunja/vikunja:pr-2676

Last updated for commit 220af19

@fritzbauer
Copy link
Copy Markdown

Just tested the PR preview and can confirm that this fixes #2646 as well. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/filters Filter syntax, saved filters, filter presets, query DSL area/subtasks Subtask hierarchy, indentation, ordering, collapse concern/regression Worked in a prior release, now broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Project "New Saved Filter" View | Duplicates Subtasks

2 participants