Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using Math to Add Custom Field Values (into Another Custom Field)

Emma Hecht
Contributor
February 20, 2023

Hi there,

I want to add the values in 3 custom fields together and fill in that sum in another custom field. Here is what I have tried so far that have gotten "Success" in the audit log (but have not actually been successful, i.e. — have not added the fields together and filled the other custom field):

(1)

Screenshot 2023-02-20 at 4.46.48 PM.png

(2)Screenshot 2023-02-20 at 4.18.47 PM.png

 

The scheduled JQL is: issuetype in standardIssueTypes() AND status != "To Do" AND status != "Outline" AND status != "Initial Draft"

I did check that the custom field IDs were all accurate. And I've been manually running the rule with the "Run rule" button but have unchecked the "Only include issues that have changed since the last time this rule executed."

Thanks! 

2 answers

1 accepted

3 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 20, 2023

Hello @Emma Hecht 

That is not the right syntax for a math function. Refer to

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/

{{#=}}

The above needs to appear at the beginning of the equation.

{{/}}

And that needs to appear at the end of the equation.

Additionally, each smart value has to be enclosed in double curly braces:

{{#=}} {{issue.customfield_1}} + {{issue.customfield_2}} {{/}}
1 vote
Emma Hecht
Contributor
February 21, 2023

Oh got it, thanks so much! Used the link you provided and got it to work with:

{{issue.customfield_11244.plus(issue.customfield_11245).plus(issue.customfield_11246)}}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events