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
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.
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])")
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.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG