Skip to content

Create system notes when design discussion is getting removed

What does this MR do and why?

Here you can find the new system note, that is getting created after design discussion was removed (using the destroyNote GraphQL mutation). To keep it consistent with the current started a discussion on XYZ note, the new one - deleted a discussion from XYZ is created only when discussion is removed, notes are not created when discussion comments are removed.

Screenshots or screen recordings

Screenshot_2023-01-12_at_00.24.15

How to set up and validate locally

  1. Pick an issue (Example: Local gdk.test Wget2#1)
  2. Add a design and start a discussion on it
  3. Remove the last design discussion by running the following 👇 GraphQL mutation

Mutation:

mutation destroyNote($input: DestroyNoteInput!) {
  destroyNote(input: $input) {
    errors
  }
}

Query variables:

{
  "input": {
    "id": "gid://gitlab/DiffNote/1"
  }
}

Please, use output of bin/rails r 'puts "gid://gitlab/DiffNote/#{DiffNote.last.id}"' as input.id value.

MR acceptance checklist

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

Related to #297662 (closed)

Edited by Stanislav Dobrovolschii

Merge request reports