Need Help Summing Business Points in Jira Automation

emmanuel mancuso February 7, 2025

Hello everyone,

I'm building an automation rule to calculate a progress percentage at the Story and Epic level based on a custom field called Business Points from child tickets. The Business Points are weighted as follows:

  • 1 – Lowest
  • 2 – Low
  • 3 – Medium
  • 4 – High
  • 5 – Highest

The calculation I need to perform is:
(Sum of weights for children with status "Demo" or more advanced / Sum of weights for all children) * 100

My automation rule follows these steps:


1 - Trigger: When a Story’s status or Business Points change.

2 - Condition: Check that the issue is a Story.

3 - Retrieve Epic Parent: Get the parent Epic of the Story.

4 - Lookup Issues: Use a JQL query to retrieve all child Stories with:

"Epic Link" = {{parent}} AND issuetype = Story

5 - For JQL Branch: Iterate over the parent’s children.

6 - Extract Business Points:
I create a variable (let’s call it businessPointsList) that collects the Business Points from each child by extracting the numeric value before the "-" using:

{{#lookupIssues}}{{fields.customfield_12006.value.split("-").first}}{{^last}}, {{/}}{{/lookupIssues}}

7 - This displays correctly in my log, for example:

 

Business Points Log Display :1, 3, 4

 

Problem:
My goal is to sum the elements of this list to calculate the overall progress percentage, but I’m unable to perform the sum directly on businessPointsList using Jira Automation smart values.

Has anyone managed to sum the elements of a list (which in my case contains only numeric values) within Jira Automation? Are there any workarounds or best practices to accumulate a total from a list of smart values?

Any help or suggestions would be greatly appreciated!

Thank you in advance.

2 answers

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 7, 2025

Hi @emmanuel mancuso 

You appear to be using Jira Server / Data Center.  Is that correct?  If so, the Lookup Issues action for those versions of automation do not contain custom fields yet: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877

As you want to update a field based on the sum of fields, the REST API must be used with the Send Web Request action rather than using Lookup Issues.  Please see this post describing that approach:

https://community.atlassian.com/t5/Jira-articles/How-Can-I-Sum-Up-Multiple-Issues-into-a-Parent-Number-Field/ba-p/2882712#M16701

Kind regards,
Bill

0 votes
Vishal Biyani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 7, 2025

@emmanuel mancuso 

You can refer to this link which shows how to sum values.

see if this helps you move forward

emmanuel mancuso February 7, 2025

How to use it on a list of values?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events