Skip to content

Add hasParent field to issue type

Related to #425454 (closed)

What does this MR do and why?

Adds the hasParent field to the Issue type to indicate if an issue has a work item assigned as a parent.

This is needed for work item parent support in legacy issues. If the issue is assigned to an epic we make a request to fetch the epic but if the issue has a work item parent (meaning a work item of type Epic) we need to make a different request to fetch this parent and display it in the issue sidebar. (see #423984 (comment 1562972568) for more context).

The field is marked as alpha as are other work item related fields. Also, this field will not needed after issues are migrated to work items.

Example query

query gettIssue {
  project(fullPath: "gitlab-org/gitlab-test") {
    issue(iid: "10") {
      hasParent
    }
  }
}

Example response

{
  "data": {
    "project": {
      "issue": {
        "hasParent": true
      }
    }
  }
}

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 Eugenia Grieff

Merge request reports

Loading