Add ability to CRUD an "Approval Gate" approval rule on a Project (FE)
Problem to solve
This is the frontend implementation issue for the feature described by #267511 (closed).
Proposal
Add the ability to choose an "Approval Gate" as a type of project approval rule.
Design
| Current UX |
|
|
|
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Feature flag
This will use the same feature flag as #267511 (closed), which is currently :compliance_approval_gates
Implementation plan
frontend -
Create & Update
Only if the name doesn't match one of the READONLY_NAMES values. We don't want this appearing on the licence compliance or Vulnerability check add approval rules forms!
- Pass the
:compliance_approval_gatesfeature flag to the frontend - Add new
Approver typedropdown toee/app/assets/javascripts/approvals/components/rule_form.vue- Options:
Users or groupsandApproval service API
- Options:
- On
Users or groups- Hide input
Add approval gate
- Hide input
- On
Approval service API- Make sure the store uses the new approval gate rule type on store mutations/actions
- Hide inputs
Number of approvals requiredandAdd approvers - Show input
Add approval gate - Validate
Add approval gateis a valid URL (maybe<input type="url" />is easiest)
- Add
approvalGateto store and make sure it is submitted in the right places - Add unit tests to
ee/spec/frontend/approvals/components/rule_form_spec.js - Update QA test
qa/qa/ee/page/merge_request/new.rb
Read
- Add a new
approval gateapproval cell toproject_rules.vue - Hide the approvals required cell when a row item is an
Approval service API - Add unit tests & QA tests
Destroy
- The
modal_rule_remove.vueshould call the correct delete action depending on the rule type - Add unit tests & QA tests
Edited by Jiaan Louw



