Environment:
Vikunja v2.2.0 (Docker)
Postgres + Redis
No Typesense
Expected behavior: Filtering tasks by assignee should return only tasks assigned to that user.
Example filter: assignees in user1 && done = false
Expected result: Only tasks or subtasks assigned to user1 are returned.
Actual behavior: Filter results appear inconsistent across task branches:
Some parent tasks are included together with all subtasks, including subtasks that do not match the filter
Other parent tasks are excluded entirely, even when they contain subtasks that do match the filter
This results in both inclusion of non-matching tasks and exclusion of matching tasks
Minimal reproducible example:
Structure
Task 1
Task 1a (assigned to user1)
Task 1b (assigned to user2)
Task 2
Task 2a (assigned to user1)
Task 2b (assigned to user2)
Filter: assignees in user1
Result:
Task 2 is included with both subtasks, including non-matching Task 2b
Task 1 is excluded entirely, including matching Task 1a
Verification:
Confirmed via browser dev tools. The API request was of the form “/api/v1/projects/{id}/tasks?..&filter=assignees+in+user1”
The API response itself includes tasks that do not match the filter and omits tasks that do match, so this does not appear to be a frontend-only rendering issue.
Question: Is this expected behavior due to how Vikunja handles task trees, or is it a bug in filtering logic?
If it is intended behavior, is there any way to return only matching tasks, or apply consistent parent/child inclusion rules?
Notes:
Issue persists even with only 2 levels of hierarchy
Tested with a simple minimal project structure
Does not appear to be a filter syntax issue