You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
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!
Resolved my question by https://community.atlassian.com/t5/Jira-Software-questions/JMWE-sum-array-not-summing-array/qaq-p/1511608#U1652205
Here is what I did:
(customfield_10047 is the ID of "Score", customfield_10018 is the ID of "Parent Link")
{% set values = ("'Parent Link' = " + issue.fields.customfield_10018.data.key) | searchIssues(fields = "customfield_10047") | field("fields.customfield_10047") %}
{% set total = 0 | int %}
{% for val in values %}
{% set total = total + (val | int) %}
{% endfor %}
{{total}}
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...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.