Convert task list item into work item
What does this MR do and why?
Adds a new mutation that will convert a task list item in an issue's description into a separate work item that is related to the original issue containing the description. Mutation should:
- Create a new work item using the task list item as the title of the new work item.
- Mark the new work item as related to the original issue.
- Update the original issue's description to add a markdown reference to the newly created work item.
How to set up and validate locally
- Run
bundle exec rails console
- Run
Feature.enable(:work_items)
- Execute a GraphQL query like
mutation {
workItemCreateFromTask(
input: {
id: "gid://gitlab/WorkItem/1",
workItemData: {
lineNumberStart: 1,
lineNumberEnd: 2,
title: "New work item title",
workItemTypeId: "gid://gitlab/WorkItems::Type/1",
lockVersion: 1
}
}
) {
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.
Related to #346042 (closed)
Edited by Mario Celi