Support multi-substring search in project selector#22840
Merged
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
79e0775 to
6024c23
Compare
NobodysNightmare
requested changes
Apr 22, 2026
Contributor
NobodysNightmare
left a comment
There was a problem hiding this comment.
While I agree to the high-level approach to reach the given goal, as implemented right now, this would have a higher blast radius, than just the project selector. It would also affect all other places where we filter projects by their name.
I think that separating ~ and ** is the intended way to fix this, so this should be fixable.
Separate the ~ (contains) and ** (everywhere/typeahead) operator paths in NameFilter: ~ keeps single-substring LIKE behavior for explicit user-facing filters; ** now splits on whitespace and ANDs all tokens, enabling multi-term search. Switch SearchableProjectListService from ['name', '~', ...] to ['typeahead', '**', ...] so the project selector routes through TypeaheadFilter, which inherits the multi-term ** behavior automatically.
1712def to
62ac6e8
Compare
NobodysNightmare
approved these changes
Apr 22, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
I was a bit fed up with the UX of the project selector. I usually search by multiple "gorilla" words and not just by one.
Implementation:
Split the search query on whitespace and require each token to appear
in the project name, so e.g. "big fish" matches "the big beautiful fish"
and "big fi" matches as a partial-word substring.
space-separated token, for the ~ and ** operators
namefilter use the more flexible/widertypeaheadfilter with the extended "**" operator (The typeahead filter is currently inheriting from the name filter and I didn't touch that). This will become handy in the future when we likely want to also search for project identifiers, soon.Closes https://community.openproject.org/work_packages/74199