MR search by approvers doesn't use reserved values for "None" and "Any"
Summary
Using the "Approver" filter when searching MRs has slightly unexpected behavior when using the "None" or "Any" option. The query treats those options as usernames instead of reserved values.
Steps to reproduce
Choose the "None" or "Any" option for "Approver" in the search filter bar for MRs — that's all it takes.
Example Project
Currently experiencing this behavior for private projects on GitLab.com.
What is the current bug behavior?
Selecting "Any" shows the username and icon for this user. The URL contains approver_usernames[]=Any
in the query. All MRs, regardless of approver, are shown in the results.
Selecting "None" shows the username and icon for this user. The URL contains approver_usernames[]=None
in the query. No MRs, regardless of approver, are shown in the results.
What is the expected correct behavior?
The special "Any" and "None" values should be appropriately reflected in the UI and URL query string, in addition to returning appropriate results.
Relevant logs and/or screenshots
see above
Output of checks
This bug happens on GitLab.com
Possible fixes
Distinguish system-provided options (with reserved parameter names and/or values) from user-generated options.
NOTE: I haven't tried this yet, but I suspect that a similar outcome may be possible with other filters that don't make this distinction, such as Milestone.
/label gitlab-ce~2278648