Use parent/child relationship when creating a task
What does this MR do and why?
Instead of just relating work items (original work item and newly created task) in "workItemCreateFromTask" mutation, parent/child relationship is created between them. Originally it was planned to support both types of relationships but because Task will rely on always having a parent (because of navigation), we will always create parent/child relationship only - #365130 (comment 1025718706)
Related to #365130 (closed)
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Feature.enable(:work_items)
Feature.enable(:work_items_hierarchy)
mutation {
workItemCreateFromTask(
input: {
id: "gid://gitlab/WorkItem/576",
workItemData: {
lineNumberStart: 1,
lineNumberEnd: 2,
title: "New work item title",
workItemTypeId: "gid://gitlab/WorkItems::Type/5",
lockVersion: 6
}
}
) {
errors
workItem {
id
title
description
}
newWorkItem {
id
title
description
workItemType {
name
id
}
}
}
}
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Jan Provaznik