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_gates
feature flag to the frontend - Add new
Approver type
dropdown toee/app/assets/javascripts/approvals/components/rule_form.vue
- Options:
Users or groups
andApproval 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 required
andAdd approvers
- Show input
Add approval gate
- Validate
Add approval gate
is a valid URL (maybe<input type="url" />
is easiest)
- Add
approvalGate
to 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 gate
approval 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.vue
should call the correct delete action depending on the rule type - Add unit tests & QA tests
Edited by Jiaan Louw