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

0 votes

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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,042 views 13 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot