Skip to content

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

  1. Create a new MR to get to the new MR page
  2. Click "Add Approval Rule"
  3. Type in a repeatable name like "test"
  4. Add an approver
  5. Click "Add Approval Rule"
  6. Repeat steps 2-5 exactly (same name in 3, same approver in 4)
  7. Click "Submit Merge Request"

Editing Existing

  1. Create a new MR to completion without adding any special approval rules, etc.
  2. Edit the new MR
  3. Click "Add Approval Rule"
  4. Type in a repeatable name like "test"
  5. Add an approver
  6. Click "Add Approval Rule"
  7. Repeat steps 3-6 exactly (same name in 4, same approver in 5)
  8. 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)