Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

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!


0 votes
Answer accepted

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.




Suprija, I have a similar issue where we have sub-tasks related to a issue. On the subtasks users enter a number of hours (number field) that it took them to complete the sub task. Could this script be modified to look at an issues' subtasks, look at that custom field, and sum the entries? Both the parent issue and subtasks are custom issue types if that matters at all? 

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

Atlassian Community Events