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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Calculate sum of custom number field from all epics to their Initiative

Hi Guys,

Does anyone know how to calculate sum of a custom number field from all epics to their initative? I tried ScriptRunner and JMWE. JMWE seems more simple. But I cannot get the right value. It always return NAN.


Here is the case:

We use advanced roadpmap in our jira cloud. Use the Initiative and Epic types. Added a custom number field: Score. Want to calculate sum of Score in all epics automaticlly.

- TIS-1 Initiative issue:  (Score: <Empty>)

|----TIS-2 Epics issue No.1  (Score: 11)

|----TIS-3 Epics issue No.2  (Score: 22)

|----TIS-4 Epics issue No.3  (Score: 33)

|----TIS-5 Epics issue No.4  (Score: 44)

Use Event-based Actions in JMWE:

Current issue: TIS-2

Target issue: TIS-1

{{issue | initiative()|membersOfInitiative("Score")|sum("Score")}}

Always return: NaN


BTW: If you have any suggestion by ScriptRunner, please don't hesitate to comment!!

Thanks in advance!

1 answer

1 accepted

1 vote
Answer accepted

Resolved my question by 


Here is what I did:

  1. Use "Event-based Action" ;
  2.  Add "Set field value" Post-functions;
  3. Choose "Parent issue of the current issue in the Portfolio hierarchy" as "Target Issue"
  4. Field "Score" and the following code in value.

         (customfield_10047 is the ID of "Score", customfield_10018 is the ID of "Parent Link")

{% set values = ("'Parent Link' = " + | searchIssues(fields = "customfield_10047") | field("fields.customfield_10047") %}
{% set total = 0 | int %}
{% for val in values %}
{% set total = total + (val | int) %}
{% endfor %}

Suggest an answer

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

Building a powerful Kanban dashboard in Jira with Great Gadgets app

Kanban is a popular agile framework suitable for both operations and development teams. It does not matter if you are a support team handling issues reported by customers, an internal service desk te...

53 views 0 0
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