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

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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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

Suggest an answer

Log in or Sign up to answer