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

How can I access with groovy the subtasks of linked issues?

We are working with Jira Server and JMWE plugin.

We have created an issue type that stand in the hierarchy above the epic- what means this issue type "abc" hast always more than one linked Epic inside.

Now we have a transition in epic workflow to sum up all storypoints from all issues inside the epics.

Also we have a transition to sum up all storypoints of all linked epic.

But always you have to update first the epic and after you can make the update in abc

My question is: Is there a possibility to make it in one step out of abc?

Is it possible to access the subtasks of linked issues?


4 answers

2 accepted

0 votes
Answer accepted

Thank you very much for your help!

You are welcome!


Hi @Anita Hütter ,

Using JMWE, to set the Story Points field value of an issuetype(say "abc") to sum of the Story Points field value of all the tickets which belong to the Epics linked to the "abc" issue : 

  • Add a “Set field value (JMWE app)” post-function on the desired transition of the "abc" issuetype
  • Select “Story Points” field
  • Select “Value Type” as “Groovy Expression” and add the below Value :
issue.linkedIssues.findAll{ == "Epic"}.stories.sum{ it.sum {it.get("customfield_10006", 0)} }

Replace customfield_10006 with the id of "Story Points" field.

The above script finds the Epics linked to the current issue(through any link type) and sums the Story Points value of all tickets which belong to the Epics.



We have opened a support ticket in our customer portal, to better track your request and added you as the reporter for that ticket. Please access the ticket and make sure that it is accurately showing you as the reporter.

If you need us to make any changes to the reporter field or unable to access the ticket, please let us know here in this thread.




Hello Suprija, how can it be that your script

issue.linkedIssues.findAll{ == "Epic"}.stories.sum{ it.sum {it.get("customfield_10006", 0)} }

runs good in our test instance but causes the following exception in the other:

groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Double#plus.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
 [class java.lang.Character]
 [class java.lang.String]
 [class java.lang.Number]

Different versions of Jira or Java on the two systems are the most likely cause of this, although it may also be down to different code in an app, if the code is looking at app data.

in the one instance we have JMWE 6.4.0 -> hats where the script is working

in the other instance ( where I need it to be running) we have JMWE 6.6.1 - here it doesnt run

I believe the script should be:

issue.linkedIssues.findAll{ == "Epic"}.sum{it.stories.sum{it.get("customfield_10006", 0)} ?: 0 }
Like # people like this

After first tests it looks good. Thank you very much for your help!


Its working with both versions of JMWE thanks!

0 votes

Please remember, when you are looking at the sub-tasks, putting estimates on them breaks your sprint and stops you doing them.  It's fine to put story points or estimates on sub-tasks, as long as you do not use them for the sprint estimation statistic.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Do you use Jira Cloud with Microsoft Teams?

Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...

527 views 1 9
Read article

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