Fix members search with multiple words
📖 What does this MR do?
Related to #328667 (closed)
Currently group/project member searches with multiple words do not work correctly, it only searches for the last word. This is because GlFilteredSearch
splits up the search term by spaces into multiple "tokens". From what I have found in the codebase it appears the fix for this is to gather up all of the search "tokens" and concatenate them into one search term.
We use this technique in the following places:
- app/assets/javascripts/issues_list/components/issuables_list_app.vue#L350
- ee/app/assets/javascripts/boards/components/epic_filtered_search.vue#L114
- ee/app/assets/javascripts/integrations/jira/issues_list/components/jira_issues_list_root.vue#L166
💻 Local testing
- Create a group or project
- Navigate to group/project -> "Members"
- Type a term with two or more words in the search bar
📷 Screenshots
View | Before | After |
---|---|---|
Group members (search term: cassie frami ) |
||
Project members (search term: mose haley ) |
🚦 Does this MR meet the acceptance criteria?
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because _____.
-
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers - [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Peter Hegman