Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

ScriptRunner JQL - Dashboard display all children and childrens children of an issue type

Hello Community,

I am trying to build a dashboard in Jira that displays all the children, and the children of its children for one specific issue type.

In my Jira instance I have a hierarchy of issue types that go as follows:

  • Feature 
    • Epic
      • Story
        • Subtasks

As you can see, Feature is on the top of the chain.

  • A Feature will only have Epic's as its children
  • An Epic will have a Feature as its parent and Stories as its children
  • A Story will have Epic as its Parent and Sub tasks as its children.

I want to make a filter, to display on a dashboard, that grabs everything underneath a Feature (this means all the Epics underneath it, all the Stories underneath it, all the subtasks underneath it). 

I have not been able to do this yet and was hoping someone could provide me with some information as to how this can be achieved.

Additionally, I want to make it so I can filter on the filter mentioned above.

I would like to enter a specific Feature ID and filter the results of the above filter such that it only shows the children underneath that specific Feature.

Thank you for your time!



2 answers

It seems like you have Advanced roadmaps, so you can use:

key in portfolioChildIssuesOf("FEATURE-1")

Hi Roberto- I know you mentioned Script Runner specifically, but wanted to show an example of how this could be done with Power Scripts.

You'd save the following script in SIL Manager with filename InitiativeIssues.sil:

/* This script will return all Epics, Standard Issue Types, and Sub-task
Issue Types associated with a supplied Jira Portfolio Initiative.

Example JQL: key in silJQLList(InitiativeIssues.sil, INITIATIVE-24)

string [] results;

string [] initiatives = selectIssues("\"Parent Link\" = " + argv[0]);
for(string epic in initiatives) {
  results += %epic%.key;
  string [] standards = selectIssues("\"Epic Link\" = " + %epic%.key);
  for(string standard in standards) {
    results += %standard%.key;
    string [] subtasks = selectIssues("parent = " + %standard%.key);
    for(string subtask in subtasks) {
      results += %subtask%.key;

return results; 

 Then in JQL search, you'd run

key in silJQLList(InitiativeIssues.sil, FEATURE-1)

This would return all Epics, Standard Issue Types and Sub-task Issue Types associated with the variable Feature ID for use in filters, dashboard gadgets, etc.

Suggest an answer

Log in or Sign up to answer

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you