[IMP] project_ux: show sub-tasks when the "Is Sub-Task" filter is active - #147
Open
les-adhoc wants to merge 1 commit into
Open
[IMP] project_ux: show sub-tasks when the "Is Sub-Task" filter is active#147les-adhoc wants to merge 1 commit into
les-adhoc wants to merge 1 commit into
Conversation
The "Is Sub-Task" filter restricts the domain to parent_id != False, but the task list keeps sub-tasks hidden while the "Show Sub-Tasks" display mode is off: the model injects display_in_project = True, which is False for any sub-task sharing its parent's project. The list then comes back empty with no hint, so the sub-task looks like it does not exist. When the sub-task filter is active, drop the display_in_project leaf so the filter is honored and the sub-tasks show up, without requiring the user to enable the display mode by hand. The "Show Sub-Tasks" toggle is reflected as selected while the filter forces it, to avoid an inconsistent "off but showing" state.
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
The "Is Sub-Task" filter (
parent_id != False) returned an empty task list whenever the "Show Sub-Tasks" display mode was off, with no hint as to why — so an existing sub-task looked like it did not exist.Why
The task list model injects
display_in_project = Truewhile sub-tasks are hidden. That field is False for any sub-task sharing its parent's project, so combining it with the sub-task filter yields an empty set.How
_processSearchDomain(list/kanban model): when the domain already restricts to sub-tasks, drop thedisplay_in_projectleaf so the filter is honored and the sub-tasks show up — no need to toggle the display mode by hand.Test plan