[go: up one dir, main page]

Skip to content

BE: Create new work item from an existing work item

Release notes

You can now create new related work items directly from existing ones, streamlining your workflow and saving you time. This new feature allows you to easily relate items across all supported work item types, including Epics, Issues, Tasks, Objectives, and Key Results, enhancing your ability to manage complex projects and track relationships between different pieces of work.

Summary

As a feature parity towards ability to create a related issue from an existing issue, we need to add support for relating a work item while creating it from an existing work item, this interaction involves updates to frontend as presented in #418133[Create_related_item.png] and the feature needs to be available across all work item types which support Linked Work Items widget. This includes Epics, Issues, Tasks, Objectives, and Key Results.

Proposal

From the actions menu, we will provide the user with the option to create a new related item. And regarding backend, we need to update workItemCreate mutation to accept an additional parameter relatedWorkItemId.

Example mutation

mutation createWorkItemWithLinkedWorkItem {
  workItemCreate(
    input: {namespacePath: "gitlab-org/plan-stage/epic-migration-test-group", title: "Test linked work item", workItemTypeId: "gid://gitlab/WorkItems::Type/91413915", linkedItemsWidget: { workItemsIds: ["gid://gitlab/WorkItem/151075213"]}}
  ) {
    workItem {
      title
      webUrl
      widgets {
        ... on WorkItemWidgetLinkedItems {
          linkedItems {
            edges {
              node {
                workItem {
                  title
                }
              }
            }
          }
        }
      }
    }
    errors
  }
}

Designs

See design reference here.

Edited by Eugenia Grieff