Creating a protected environment shows the misleading message "This rule already exists"
Summary
When protecting an environment a red message appears "This rule already exists" even if there are no pre-existing rules. This doesn't seem to impact the creation of protected environment, the workaround is to ignore the message.
Steps to reproduce
- View Settings -> CI/CD -> Protected Environments
- Select Protect an environment.
- From the Environment list, select the environment you want to protect.
- In the Allowed to deploy list, select a role
- In the Approvers list, select the role
- In the Approval rules section a red message appears "This rule already exists" when there is no rule yet.
- This message does not prevent to click Protect and correctly save the protected environment.
What is the current bug behavior?
What is the expected correct behavior?
No message should be seen when no there are no existing rules.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Possible fixes
Message was added via #438417 (closed)
Edited by Segolene Bouly