Skip to content

Add hasEpic to issue type

What does this MR do and why?

Issue: #371083 (closed)

This adds hasEpic to the Issue type and indicates if an issue is related to an epic. It can be used in cases users have access to the issue but not the epic.

Screenshots or screen recordings

Screenshot_2022-08-25_at_14.43.40

How to set up and validate locally

  1. Find an issue with an epic, and one without and get the global ID (e.g. Epic.first.issues.first.id => 440, is the global ID: gid://gitlab/Issue/440)
  2. Go to http://gdk.test:3000/-/graphql-explorer
  3. Use the following GraphQL Query
query Issue {
	issueWithoutEpic: issue(id:"ISSUE_WITHOUT_EPIC_GLOBAL_ID") {
    id
    hasEpic
    epic {
      id
    }
  }
  

  issueWithEpic: issue(id:"ISSUE_WITH_EPIC_GLOBAL_ID"){
    id
    hasEpic
    epic {
      id
    }
  }
}
 

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