Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Is there a way to tell an issue is an Epic via the API

I am getting the list of issues using the search API. I have the list of issues with  the epics inside it, by I need to identify them. In my jira instance the issues that are epics has this issuetype field:
  1. avatarId10867
  2. description"gh.issue.epic.desc"
  3. iconUrl"https://comalatechdev.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10867&avatarType=issuetype"
  4. id"7"
  5. name"Epic"
  6. self"https://comalatechdev.atlassian.net/rest/api/2/issuetype/7"
  7. subtaskfalse
The problem is that I don't know if an epic has the same in all jira instances, since I have tried changing the language and the same fields now are:
  1. avatarId10867
  2. description"Creado por JIRA Software - no editar ni eliminar. Tipo de incidencia para una historia del usuario grande que debe desglosarse."
  3. iconUrl"https://comalatechdev.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10867&avatarType=issuetype"
  4. id"7"
  5. name"Épica"
  6. self"https://comalatechdev.atlassian.net/rest/api/2/issuetype/7"
  7. subtaskfalse
As you see the constants are id, self, iconUrl and subtask. My question is: in all jira instances the issuetype with id 7 is epic? If not, how can I check if an issue is an epic?
Thank you in advance.

1 answer

You can get all of the issue types: https://docs.atlassian.com/jira/REST/cloud/#api/2/issuetype-getIssueAllTypes

You can also get all of the epics for a board: https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board/{boardId}/epic-getEpics

You can also use anything from the /epic API: https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/epic

I hope that helps achieve your use case. Please let me know if it does not.

Thanks Robert for the suggestions.

I'm not sure any of these can really help my use case. I have an issue ID and I'm trying to identify if that issue is an Epic or something else. Just having the list of issuetypes won't help as you can't tell which one is the Epic one as far as I can tell other than by Name which can change in different languages.

If it is an issue I do want to gather the contained stories so the GET /rest/agile/1.0/epic/{epicIdOrKey}/issue  call would be helpful once I know if its an epic. 

You can use GET /rest/agile/1.0/epic/{epicIdOrKey}. If the issue is an epic, then a success response will be returned, otherwise 404.

@Krzysztof Kercz I am facing a similar problem, and apparently the getEpic endpoint does not work your NextGen projects.
How do I find out if an issue is an epic in a nextGen project?

I don't think there is any straightforward way. Feel free to create a feature request in the [ACJIRA](https://ecosystem.atlassian.net/browse/ACJIRA) project for this.

Okay thank you. I have create the following issue: https://ecosystem.atlassian.net/browse/ACJIRA-1966

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

305 views 9 7
Read article

Community Events

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

Events near you