How do I get the Epic an issue is related to? even if it's a subtask of an issue

I’m making a REST API Request to get information from a single Issue via the ID, and I need to obtain the Epic this issue is related to even if the epic is not the immediate parent for this issue, it doesn’t seem I’m getting the epic information in the payload at all, only the “parent” record info, but in the event the Ticket in question is a subtask of another ticket, the parent information refers to the ticket and not the grandparent level epic.

Hello @DavidM1

Jira does not store any grandparent / grandchild relationship information about issues, so there is no information that the REST API can lookup.

You have to lookup the parent issue of the Subtask issue, then subsequently lookup the parent of that issue, which in your case is an Epic issue.

1 Like