The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I know if an epic has stories (REST API)

Stephen Costanzo
April 23, 2018

Note: I know that I can use this to get the stories which are in an epic, I'd like to not call this every time.

I am trying to determine when I need to use the above instructions to get all of the stories. For a story, I can see the epic link and also if there are sub-tasks so I can navigate those well.

 [Edited for Clarity]

When using the REST API, I'm trying to get the number of stories associated with an epic. For example, when I pull back an issue, I can tell if there are subtasks under the item. I was thinking there might be the same functionality for an Epic since the UI shows the epics.

 

 

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Stephen Costanzo
April 25, 2018

@Fazila Ashraf

Thanks for the answer. I need to reword the question, it was towards the Rest API. I have a filter that returns the epics associated with multiple projects and need to know the number of stories associated with the epics. 

0 votes
Fazila Ashraf
Community Champion
April 24, 2018

Hi @Stephen Costanzo

If you have scriptrunner installed, you could use the JQL functions provided by ScriptRunner plugin to query all the epics that has stories linked to it.

Refer to the JQL functions list in https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_haslinks