Adding Approval Rules with Identical Names for a Merge Request Does Not Cause an Error
Summary
When adding a new MR or editing an existing MR, adding an approval rule for that MR with a name identical to one already in place does not cause any validation error.
Steps to reproduce
Opening New
- Create a new MR to get to the new MR page
- Click "Add Approval Rule"
- Type in a repeatable name like "test"
- Add an approver
- Click "Add Approval Rule"
- Repeat steps 2-5 exactly (same name in 3, same approver in 4)
- Click "Submit Merge Request"
Editing Existing
- Create a new MR to completion without adding any special approval rules, etc.
- Edit the new MR
- Click "Add Approval Rule"
- Type in a repeatable name like "test"
- Add an approver
- Click "Add Approval Rule"
- Repeat steps 3-6 exactly (same name in 4, same approver in 5)
- Click "Save Changes"
What is the current bug behavior?
Merge Requests with duplicate-named approval rules do not report any validation errors.
What is the expected correct behavior?
An approval rule named identically to another approval rule causes a validation error in the project settings page, so it should cause a validation error in the MR edit page, too.
Relevant logs and/or screenshots
Scenario | Video |
---|---|
Creating | simplescreenrecorder-2020-09-09_08.48.48 |
Editing | simplescreenrecorder-2020-09-09_08.57.57 |
Output of checks
Presumably, this bug happens on GitLab.com (at least Next), but the involved setup (full admin rights, multiple diverging branches) means I haven't checked it in production.
The videos above are run on master
@ ce5b73651ed3c83931fb7f1215cf3324db74a3a7
in GDK.
I am on Ubuntu Linux 20.04.1LTS. I used Firefox 80.0.1 (64bit) for the videos and most of my testing, but have also confirmed this behavior in Chromium 85.0.4183.83 (64 bit snap)