Skip to content

DRAFT: Work item conversion as part of update mutation

Nicolas Dular requested to merge nd/work-item-conversion into master

What does this MR do and why?

Part of #386876 (closed) and &9438 (comment 1281758135).

This should show a draft how we could accomplish a generic work item conversion from an architecture perspective. It's highly influenced by the feedback from the previous POC !112221 (merged) and has the following changes:

  1. It adds workItemTypeId as part of the workItemUpdate mutation
  2. It uses each Widget service to reset the data if necessary (when the widget is no longer available on the new type)

For now this MR only works for the key_result -> objective case. Once we agreed that this is the design we want to move forward, I'll implement the other missing widgets with this MR.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

mutation updateWorkItem {
  workItemUpdate(
    input: {id: "gid://gitlab/WorkItem/718", workItemTypeId: "gid://gitlab/WorkItems::Type/3186"}
  ) {
    workItem {
      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.

Edited by Nicolas Dular

Merge request reports

Loading