Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

3,996 views 11 5
Join discussion

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