Reflect state transition comments in system notes

What does this MR do and why?

With this change, the comment given while updating the state of a vulnerability will be reflected in the system note created and will be shown on the vulnerability detail page.

Related to Reflect user comment on vulnerability state cha... (#408744 - closed).

Screenshots or screen recordings

Screenshot_2023-05-03_at_13.47.53

How to set up and validate locally

Change the state of a vulnerability via GraphQL API and set a comment. Verify that the comment is shown in the system note on "Vulnerability Detail" page.

Example GraphQL query to dismiss a vulnerability
mutation DismissVulnerability($id: VulnerabilityID!, $dismissalReason: VulnerabilityDismissalReason, $comment: String!) {
  vulnerabilityDismiss(input: { id: $id, dismissalReason: $dismissalReason, comment: $comment }) {
    vulnerability {
      id
      state
    }
  }
}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Mehmet Emin INAC

Merge request reports

Loading