Forums

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

JQL to return parent record of children with specific attributes.

Ariane Finley December 19, 2022

Hi, I’m looking for guidance on the correct JQL to return parent records of children with specific attributes. Would I use a hierarchy JQL? The parent may be 1 to 3 levels above in hierarchy. 

1 answer

0 votes
Hannes Obweger - JXL for Jira
Atlassian Partner
December 20, 2022

Hi @Ariane Finley

unfortunately, "plain" JQL isn't too great with hierarchies, so to the best of my knowledge, you'll need an app from the Atlassian Marketplace to solve your use case.

Two general directions forward:

First, there's a number of apps that extend JQL by additional functions, including hierarchy-related functions. JQL Search Extensions and Scriptrunner are very popular, but there may be others.

Alternatively, you could try one of the more hierarchy-focused apps from the Atlassian Marketplace. These apps usually have their own ways of figuring out parent/child relationships between issues, and provide more powerful ways to define and navigate through issue hierarchies. I myself work on such an app, in which your use case would be easy to solve; I'll provide more details below.

Hope this helps,

Best,

Hannes

Hannes Obweger - JXL for Jira
Atlassian Partner
December 20, 2022

Just to expand on the latter: My team and I work on an app named JXL for Jira, a full-fledged spreadsheet/table view for your issues. In JXL, you can view, inline-edit, sort and filter by all your issue fields (much like you'd do in e.g. Excel or Google Sheets), and also define your own issue hierarchies. These issue hierarchies can be based on Jira's built-in parent/child relationships, issue links, or any combination of these.

To solve your use case, I'd go as follows:

  • Create a JX sheet that includes a.) the child issues that match the relevant attribues, and b.) any potential parent issues. Don't worry about the parent/child relationship; JXL will sort that out for you.
  • In JXL, enable the relevant hierarchy. If you're using the standard Epic/Story/Sub-task hierarchy, that's a one-click operation. If you have a more complex hierarchy, you need to model it first - but that should be easy, too.
  • in JXL, chose "Hide parent level issues without children". That's again a one-click operation.

The resulting set of issues should show your relevant parent issues; you can use the expand/collapse feature to view or hide the child issues, if you want. 

This is about how this looks in action:

epic-with-selected-children.gif

Once you've narrowed down your list of issues, you can work on these issues directly in JXL, trigger various Jira operations, or export your issues for further processing.

Just because you tagged your question for Jira Server: Atlassian doesn't allow new apps to be listed for Server, however JXL is perfectly compatible; it's just that we need to generate a license for you. If you're interested in the above, just let me know, we're happy to create a free trial for you.

Best,

Hannes

Suggest an answer

Log in or Sign up to answer