Duplicate approval rules in MR when scan_finding and license_finding rules are in same policy
Summary
When a scan result policy contains both scan_finding
and license_finding
in the same policy, the approval rules in MR widget shows duplicate values with same name.
Allow user to set the rule name to be displayed... (#341962 - closed) made the change to MR approvals to show only one entry for a scan result policy with multiple scan_finding
rules, but after license_finding
type was introduced, this behaviour fails in regex filter that filters the approval rule name with integer.
Steps to reproduce
- Create a scan result policy that contains both
license_finding
andscan_finding
rules in a same policy
- Create a MR and check that the approval rules are duplicated
Example Project
What is the current bug behavior?
Duplicate approval rules are shown
What is the expected correct behavior?
Approval rules of type scan_finding
and license_finding
should be grouped and shown
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)