I was wondering if anyone knows whether it's possible to identify the original special "Epic" issue type via the REST API.
I've found that it's possible to rename Epic to something else, meaning that via the API, I can't identify which issue type is the original "Epic" type.
I have tried the following APIs:
Each provides the same issue schema back:
"description": "A big user story that needs to be broken down. Created by Jira Software - do not edit or delete.",
"name": "Renamed Epic",
Unfortunately, there is no where to tell this is a core "Epic" type. Any ideas?
After getting frustrated searching for a way to do this and looking at deprecated APIs for hierarchy; am quite glad I found your answer. This method is a lifesaver. Although, I must state that https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-fields/#api-rest-api-3-field-fieldid-contexts-get - the getContexts method has been marked as deprecated. :P
Indeed, I was not able to find any information returned in the REST API to confirm that an issue type is an Epic, however, you can use the Epic Name field to identify which issues are "real" Epics.
This would be the query to return all epic issues:
Additionally, you can check both links below for more details about REST APIs and search examples:
If this query does not help, please give us more information about your final goal so we can give you further options to achieve your need. :)
Thanks for the reply @Petter Gonçalves
Unfortunately, searching for issues filtering for the "Epic Name" field is problematic, as Jira Cloud next-gen projects don't use this and there is the possibility that the project does not contain any epic type issues yet — in which case the query will return 0 issues.
As far as I can tell, this is not possible :(
I agree with you that the mentioned solution would not work if you have:
- Renamed Epic + The Epic is from a next-gen project
- Renamed Epic + There is no Classic Epic issues in the instance
It's indeed a limitation of JIRA REST API. You must collect in the UI the original EPIC ID to properly return the "real Epic" through REST API, independent of its name or project type.
That been said, I would really appreciate if you could provide us more details about what kind of limitations it is causing in your scenario, so we can talk with our internal teams and further investigate if we can provide any options to meet your needs.
I am integrating an external tool with a user's Jira instance. I am giving the user the choice of how to map certain issue types. Therefore, I need to be able to identify the epic issue type. Obviously if this has been renamed, this is going to be inconsistent.
Just a quick tweak in the REST API response for issue types would be the perfect solution :)
Considering there is currently:
Then, you could go as simple as:
Of course, I don't know the internal mechanisms and potential complications that could be lurking!
Hello Community! We thoroughly enjoyed this just-for-fun conversation in the Jira Admin Group about what it's like to be a Jira Admin. For #JiraJuly, our talented designers created these graphics t...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events