Skip to content

Add work_item_iid to requirement update mutation

charlie ablett requested to merge 387480-cablett-workitem-iid-argument into master

What does this MR do and why?

Add work_item_iid to requirement update mutation. Since we are removing legacy iid, we'll need to ensure the work item iid is available for this mutation.

How to set up and validate locally

  1. Find or create a requirement in a project.
  2. Use the following query to find the relevant IID:
query {
  project(fullPath: "Flightjs/Flight") {
    requirements(first: 1) {
      nodes {
        iid
        workItemIid
        title
      }
    }
  }
}
  1. Use that work item iid (ensure it's different than the requirement iid for testing purposes)
mutation {
  updateRequirement(input: { projectPath: "Flightjs/Flight", workItemIid: "47", title: "new title" }) {
    requirement {
      title
    }
    errors
  }
}
  1. Just to make sure, retrieve the same requirement again
query {
  project(fullPath: "Flightjs/Flight") {
    requirements(first: 1) {
      nodes {
        iid
        workItemIid
        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.

Related to #387480 (closed)

Edited by charlie ablett

Merge request reports