how to filter out all issues were all descendants have been completed

Hi,

 

We have a structure with a number of top level issues, and then descendants up to 8 levels deep.
We would like to create a query such that has only entries where the leaf level are not resolved.

 

Wondering how we can do this with S-JQL

 

 

Francis 

2 answers

1 accepted

This widget could not be displayed.

Hi Francis,

You can indeed do this with S-JQL, the query will look something like this:

issue in structure(structureID, "leaf AND [resolution = unresolved]")

This query will return only the unresolved leaf issues in the specified structure.

You can also reference the structure by name, but remember to enclose the name in double quotes ("") if it contains spaces or non-letters.

You can find more details in the documentation: Combining S-JQL constraints with Boolean operators.

 

Cheers,

Robert

This widget could not be displayed.

While Robert's answer is correct in that it returns unresolved leaf issues, it seems like you need to display top-level issues that have unresolved leaves. This is achieved by:

issue in structure(structureID, "root and descendant in (leaf and [resolution is empty])")

That one just returns the top leven one (due to the 'root and'). I'm starting to understand how this works. The complete query which returns what I want is root or descendant in (leaf and [resolution is empty]) or (leaf and [resolution is empty])

So - you need the complete branches, right? I.e. if you have a structure A - B -- C (resolved) D - E -- F (unresolved) you want to see D, E, F? In this case, you'll need issue or ancestor of (leaf and [resolution is empty]) this query translates as: find all unresolved leaves, and return them and their ancestor (up to the root). Also note that your query has "root or ..." which will return, among other things, all top-level issues regardless of whether there are unresolved leaves under them or not.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

511 views 3 18
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you