Merge Request "Approver is" filter misses MR's with multiple approval rules
Summary
When an MR contains more than one Approval Rule containing the same Approver, it's no longer possible to find it by filtering the MR list using the "Approver is" filter, on the search bar of the "Merge Requests" view.
Steps to reproduce
On a test project: 2. Create a protected branch "branch"
- Invite a dummy user to that project, so you have a different user than your own to require approvals from
- Add an approval rule for that branch, requiring one approval from this dummy user.
- (Optional) Make some changes to any file in the repository, commit to a new branch, and create an MR to merge with the protected branch "branch"
- (Optional) Confirm that this MR can be found using the "Approver is: ".
- Add another approval rule, with a different name, requiring one approval from that same user.
- Make some changes to any file in the repository, commit to a new branch, and create an MR to merge with the protected branch "branch".
- Confirm that this MR can no longer be found using the "Approver is: ".
Example Project
https://gitlab.com/dnldnz_ultimate_group/test-approval-rule-filter
What is the current bug behavior?
Merge Requests filter for "Approver is" no longer works when a user is present in more than one approval rule in the same MR.
What is the expected correct behavior?
"Approver is" filter should still find MR's where the approver is present in more than one rule.
Relevant logs and/or screenshots
Two different Approval rules configured to require 1 approval from the same user
Existing, open MR requiring where approver shows twice in two different rules
Results of filtering by that approver
Output of checks
This bug happens on GitLab.com
Possible fixes
Edited by Daniel Diniz