Skip to content

Add WorkItemUpdateTask mutation to GraphQL API

Mario Celi requested to merge 362282-update-task-mutation into master

What does this MR do and why?

Allows to update a work item and refresh_markdown_cache of another work item at the same time. Allow to query information for both work items after the update

Related to #362282 (closed)

How to set up and validate locally

  1. Run bundle exec rails console
  2. Run Feature.enable(:work_items)
  3. Execute a GraphQL query like
mutation {
  workItemUpdateTask(input: { id: "gid://gitlab/WorkItem/1", taskData: { id: "gid://gitlab/WorkItem/2", title: "updated title" } }) {
    workItem {
      id
      description
    }
    task {
      id
      title
    }
  }
}
  • The description_html of "gid://gitlab/WorkItem/1" should be updated after the mutation. This can be verified if work item with ID 1 references work item with ID 2 in the description using the syntax #2+ that will expand the reference title.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports