Addition/subtraction of 2 custom fields does NOT work for me

Elaine Lu
Contributor
December 10, 2024

Hi,

I have two custom fields, both are number types.  I want to do addition.

I referenced to these 2 sites:

https://community.atlassian.com/t5/Jira-questions/Need-to-sum-the-values-of-2-custom-fields-and-enter-them-in-the/qaq-p/2254302

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

And used the following 4 methods to add those 2 custom fields:

 

1. {{issue.customfield_10689}}+{{issue.customfield_10692}}

2. {{#=}}{{issue.customfield_10689.plus(issue.customfield_10692)}}{{/}}

3. {{issue.customfield_10689.plus(issue.customfield_10692)}}

4. {{issue.Ops HOLD Time.plus(Ops Total HOLD Time)}}

 

None of above formulas work for me.  Audit logs say they are ran successfully, but the results have been 0.  Before addition, one has value of 5, the other has value of 0.

Can you guys try on cloud version of JSM?  

Thank you so very much in advance.

1 comment

Milad S.
Contributor
December 10, 2024

Hi Elaine,

Looking at docs, have you tried the following:

  • {{#=}} {{issue.customfield_10689}} + {{issue.customfield_10692}} {{/}}
  • {{issue.customfield_10689.plus({{issue.customfield_10692}})}}
  • {{issue.Ops HOLD Time.plus({{issue.Ops Total HOLD Time}})}}

 

As for your methods

1. {{issue.customfield_10689}}+{{issue.customfield_10692}}

  • There is a math expression (e.g., +, -, /, *); hence, it requires {{#=}} {{/}}.

2. {{#=}}{{issue.customfield_10689.plus(issue.customfield_10692)}}{{/}}

  • There is no math expression; hence, it does not require {{#=}} {{/}}.
  • Also missing {{}} for the second custom field in the plus argument

3. {{issue.customfield_10689.plus(issue.customfield_10692)}}

  • missing {{}} for the second custom field in the plus argument

4. {{issue.Ops HOLD Time.plus(Ops Total HOLD Time)}}

  • missing {{}} for the second custom field in the plus argument

 

Hope this helps.

 

Kind regards,

Milad

Like # people like this
Susan Waldrip
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 11, 2024

Thanks @Milad S_ , your clear answer is very educational!

Like Milad S. likes this

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events