Issue type hierarchy - see all issues under top level issue type
Asked by Niklas Zarnecke:

Hey,

I'm currently looking for a JQL Solution to filter for all issues under the highest issue level.

We got the following configuration:

Level 1  
Level 2  
Level 3  
Epic  
Story/Task  
Sub-Task

how can I achieve to get a filter query, with all the issues from Level 1 downwards? Is there any possible way?

I tried the following JQL query:

linkedIssue = xxx-386 OR "Parent Link" = xxx-386

Best Regards  
Niklas


Answers:
author: Hannes Obweger - JXL for Jira
body: Hi [@Niklas Zarnecke](/t5/user/viewprofilepage/user-id/4571269)

unfortunately I'm not aware of a built-in solution for this. There's the *issuekey in portfolioChildIssuesOf("\<parentIssueKey\>")* function in native JQL, but from what I can see, it only returns the direct children of *\<parentIssueKey\>*.

This being said, if you're open to solutions from the Atlassian Marketplace, you'll have options available. You could consider,

* one of the various apps that [extend JQL](https://marketplace.atlassian.com/search?query=jql&product=jira&hosting=cloud) by additional functions (ScriptRunner has been mentioned, but there's also others), or
* one of the more [hierarchy-focused](https://marketplace.atlassian.com/search?query=hierarchy&product=jira&hosting=cloud) apps; these apps typically have their own ways of figuring out, displaying, and navigating through issue hierarchies. I myself happen to work on an app in which your use case could be relatively easy to solve; I'll add more information below.

Hope this helps,

Best,

Hannes

comments: author: Hannes Obweger - JXL for Jira
body: ... and to expand on my last point: If you're open to solutions from the Atlassian Marketplace, you may want to have a look at the app that my team and I are working on, [JXL for Jira](https://marketplace.atlassian.com/apps/1224710?hosting=cloud&tab=overview&utm_source=atlassian-community&utm_medium=referral&utm_content=2736767).

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you'd do in e.g. Excel or Google Sheets.It also comes with a number of advanced features, including support for (configurable) *issue hierarchies.*

These issue hierarchies can be based on Jira's built-in parent/child relationships (like epic/story, or task/sub-task, and whatever you configured in Advanced Roadmaps), and/or based on *issue links* of configurable *issue link types*.

With these, you can build a view like e.g. this in just a couple of clicks:

![5-level-hierarchy-single-issue.gif](https://community.atlassian.com/t5/image/serverpage/image-id/339839i51B854268EE065A6/image-size/large?v=v2&px=999 "5-level-hierarchy-single-issue.gif")

Put simply, you'd create a sheet with all issues that are potentially relevant, define and activate your issue hierarchy configuration, and use JXL's various search and filter capabilities to hide any issues that are outside of the top-level issue's issue tree.

Once you've narrowed down your list of issues, you can work on your issues directly in JXL, trigger various operations in Jira, or export your issues with just one click.

Any questions just let me know!


author: Niklas Zarnecke
body: Hi [@Hannes Obweger - JXL for Jira](/t5/user/viewprofilepage/user-id/4289506)

thank you for your answer. I think we will look into the options provided by the marketplace. If I need any support I'll let you know.

Best Regards  
Niklas


author: Christian Burger
body: Hi Niklas,

if you have ScriptRunner Enhanced Search installed then you can make use of these functions: <https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-enhanced-search/jql-functions#subtask-functions>

The childrenOf function seems to me the one you will need.

Best regards,

Christian.

comments: author: Niklas Zarnecke
body: Hi Christian,

sadly we do not use ScriptRunner (yet). Is there any way to do this with the standard Jira kit?

Best regards  
Niklas


Tags: cloud

jira-cloud