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

francis
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
December 14, 2014

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

1 vote
Answer accepted
Robert Leitch [ALM Works]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 15, 2014

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

francis
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
December 15, 2014

Thanks

0 votes
Igor Baltiyskiy December 15, 2014

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])")
francis
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
December 15, 2014

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])

Igor Baltiyskiy December 15, 2014

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
TAGS
AUG Leaders

Atlassian Community Events