Skip to content

Create system notes when updating work items hierarchy

Eugenia Grieff requested to merge 362213-work-items-hierarchy-system-notes into master

What does this MR do and why?

4th task for #362213 (closed)

Adds system notes for changes in a work item's hierarhcy.

Adding a child will create notes for both the parent and the child. Examples:

  • added #105 as a child task -> displayed in the issue

  • added #104 as a parent issue -> displayed in the task

  • added #2 as a child task -> displayed in the incident

  • added #1 as a parent incident -> displayed in the task

Screenshots or screen recordings

Screen_Shot_2022-07-14_at_18.53.47

How to set up and validate locally

Sample mutation that will create notes:

createWorkItem
mutation createWorkItem {
  workItemCreate(input: {hierarchyWidget: {parentId: "gid://gitlab/Issue/{ID}"}, projectPath: "test-group/test-project-1", title:"foo1", workItemTypeId: "gid://gitlab/WorkItems::Type/5"}) {
    workItem {
      id
      title
      widgets {
        ... on WorkItemWidgetHierarchy {
          parent {
            id
          }
        }
      }
    }
    errors
  }
}

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 #362213 (closed)

Edited by Eugenia Grieff

Merge request reports