Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,360,948
Community Members
 
Community Events
168
Community Groups

How to get Epics where all Stories are done

Hello,

i need a query to get all epics having all linked stories done. I need it to correct the status of an epic if it is not done. In the same maner i have to get all stories, where the sub-tasks are allready done to set the status for such stories to the correct value.

I use the script runner add on. In SQL i could use the "not exists" clause to solve my problem. Maybe someone has an idea to how to solve it with jql.

Thanks.

3 answers

For all with the same problem here are the working queries:

issuetype = epic AND issueFunction in linkedIssuesOf("status = Done", "has epic") AND NOT issueFunction in linkedIssuesOf("status != Done", "has epic") AND status != Closed

issuetype = story AND issueFunction in parentsof("status = done") AND NOT issueFunction in parentsof("status != done") AND status != done

Have a nice day.

Thanks a lot Andrew

hi, for that query in the "has epic" part... if I need to write has Feature Epic what would be the instruction? because I tried "has 'Feature Epic' ", "has [Feature Epic]", "has "Feature Epic" ", "has (Feature Epic)"... and nothing worked

0 votes

Hi @AndréW ,

this thread should be what you are looking for, no?

https://community.atlassian.com/t5/Jira-questions/Filter-all-Epics-that-are-incomplete-but-only-have-Stories-that/qaq-p/233701

I believe what @Jamie Echlin _Adaptavist_posted should be what you need.

Cheers

Merle

Thank you @Merle Fischer

the solution in the linked page works for me.

Bye.

0 votes

Hy @AndréW 

 

You can try something like these 

issuetype = Epic and issueFunction not in linkedIssuesOf("resolution is Empty and issuetype = Story")

 

Best regards, 

Pedro Felgueiras

Hi Pedro,

your suggestion doesn't work for me. I can use resolution is not empty or issuecategory = done, in all these cases i get epics that have stories which are done and not done. I only want to get epics where all stories are done.

Best regards from Germany.

Suggest an answer

Log in or Sign up to answer