Add system note when an issue is unlinked or linked to a violation
What does this MR do and why?
Add system note when an issue is unlinked or linked to a violation.
References
Closes #554254 (closed)
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- Ensure you have ultimate license
- Enable feature flags
compliance_violations_reportandenable_project_compliance_violations. - Visit the compliance violations dashboard. Eg:
https://gdk.test:3000/flightjs/blank-project/-/security/compliance_dashboard/violations - Open any violation and note its ID.
- Run the following mutations to link an issue to the above compliance violation
mutation linkViolationIssue {
linkProjectComplianceViolationIssue(input: {
violationId: "gid://gitlab/ComplianceManagement::Projects::ComplianceViolation/17",
projectPath: "flightjs/blank-project",
issueIid: "11"
}
) {
violation {
id
status
issues {
nodes {
id
title
}
}
}
errors
}
}
- You can run the above with issues from different projects as well.
- Run the following mutation to unlink issues
mutation unlinkViolationIssue {
unlinkProjectComplianceViolationIssue(input: {
violationId: "gid://gitlab/ComplianceManagement::Projects::ComplianceViolation/17",
projectPath: "flightjs/blank-project",
issueIid: "1"
}) {
violation {
id
status
issues {
nodes {
id
title
}
}
}
errors
}
}
- Visit the details page of the violation and you should see the linked and unlinked notes in the activity section similar to the screenshot above. Eg:
https://gdk.test:3000/flightjs/blank-project/-/security/compliance_violations/17
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Huzaifa Iftikhar
