feat: keep tasks visible when search term matches project or client name#1145
Closed
josevavia wants to merge 1 commit into
Closed
feat: keep tasks visible when search term matches project or client name#1145josevavia wants to merge 1 commit into
josevavia wants to merge 1 commit into
Conversation
Contributor
|
Thanks for the contribution, I think it's a good behaviour change. I integrated this into the feature branch here #1140 because it would cause conflicts otherwise. |
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 does this PR do?
Fixes #436
Problem
In the time tracker's project/task dropdown (
TimeTrackerProjectTaskDropdown), typing a search term filters clients, projects and tasks. However, when the term matched a project or client name, the project showed up but its tasks disappeared.The cause: when a project's name (or its client's name) matched the search term, the project was added to the results together with the task list already filtered by that same search term. Since the tasks themselves don't contain the project name, that list was empty, so the project rendered with no tasks and the "N Tasks" expander vanished.
Fix
Split the two concepts in
updateFilteredResults():availableTasks— the project's selectable tasks (open tasks, plus the currently selected one even if it's done).filteredTasks— those that also match the search term.Behavior:
availableTasks— the whole project is relevant.filteredTasks), with the project expanded, exactly as before.Checklist (DO NOT REMOVE)