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!



1 answer

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 showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,647 views 18 21
Read article

Atlassian User Groups

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!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you