Skip to content

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:

💻 Local testing

  1. Create a group or project
  2. Navigate to group/project -> "Members"
  3. Type a term with two or more words in the search bar

📷 Screenshots

View Before After
Group members (search term: cassie frami) Screen_Shot_2021-04-22_at_12.47.30_PM Screen_Shot_2021-04-22_at_12.42.31_PM
Project members (search term: mose haley) Screen_Shot_2021-04-22_at_12.46.55_PM Screen_Shot_2021-04-22_at_12.43.48_PM

🚦 Does this MR meet the acceptance criteria?

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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

Merge request reports