Forums

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

Query for get stories and subtask

JavierY March 7, 2018

Hi there, 

 

I have tried to get a report with the stories and their subtasks order by story.

I have used subtasksof() and parentsof(), with out correct results. 

 

Any suggestions

 

Thanks in advance. 

1 answer

1 vote
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2018

So the subtasksof() and parentsof() are actually functions provided by Adaptavist's Scriptunner plugin for Jira.

That said, if you have this plugin you should be able to return all the stories and their subtasks with a query like this:

issuetype=Story OR subtasksof(issuetype=Story)

This should return all Stories and all the subtask of those stories.  The next question is "Do you need to sort this data in a specific way?"   You could then add an

Order by issuetype ASC

to see all the stories first, and then all the subtasks.  

However if you want to see the subtasks directly under their parent issues, you might try to order by Rank.   Something along the lines of

issuetype=Story OR subtasksof(issuetype=Story) ORDER BY Rank ASC

can show you both issues types in a more organized way.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events