Transfer project namespace field only matches a subgroup if spaces are included around the slash

Summary

When transferring a project, the namespace search field only matches a subgroup if there are spaces around the slash. E.g., it matches mlapierre-test / subgroup, but it doesn't match on mlapierre-test/subgroup.

Steps to reproduce

  1. Create a project in a group.
  2. Attempt to transfer the project to a subgroup.
  3. When searching for the target group, enter the search term without spaces around the slash, e.g., root-group/subgroup.
  4. Note that the subgroup isn't found.
  5. Try to search again, but this time with spaces around the slash, e.g., root-group / subgroup.

What is the current bug behavior?

The subgroup isn't found.

transfer_project_subgroup_search_ux_bug

What is the expected correct behavior?

The subgroup is found whether or not the slash has spaces around it.

Output of checks

This bug happens on GitLab.com

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Assignee Loading
Time tracking Loading