Skip to content

feat: keep tasks visible when search term matches project or client name#1145

Closed
josevavia wants to merge 1 commit into
solidtime-io:mainfrom
josevavia:feat/436-task-selection-after-search
Closed

feat: keep tasks visible when search term matches project or client name#1145
josevavia wants to merge 1 commit into
solidtime-io:mainfrom
josevavia:feat/436-task-selection-after-search

Conversation

@josevavia

Copy link
Copy Markdown

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:

  • If the project (or client) name matches, show all of the project's availableTasks — the whole project is relevant.
  • If only some tasks match, show just those (filteredTasks), with the project expanded, exactly as before.

Checklist (DO NOT REMOVE)

@Onatcer

Onatcer commented Jun 30, 2026

Copy link
Copy Markdown
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.

@Onatcer Onatcer closed this Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task selection after a search

2 participants