Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,293,938
Community Members
 
Community Events
165
Community Groups

Sintax for performing math operations on Automation

Hi, I have the following scenario.  I'm creating an automation rule where I need to get one custom field minus another custom field and then the result multiply it by another custom field.  So far I have this:

{{#=}}{{(issue.customfield_10463}} - {{issue.customfield_10465})} * {{issue.customfield_10466}}{{/}}

Let's say I have these values:

issue.customfield_10463 = 50

issue.customfield_10465 = 40

ssue.customfield_10466 = 12

What I need is to have (50-40)*12 = 120 but I don't know how to group it, and right now it's performing like this: 50-40*12 = -430.

Any help would be appreciated.

1 answer

1 accepted

4 votes
Answer accepted

Hi @Raúl Eduardo Echeverría Urbina -- Welcome to the Atlassian Community!

Did you copy that smart value expression directly from your rule, or retype it in your post?  I am asking as you have some misplaced parenthesis and curly brackets, so perhaps check that.

You could also do this using the dot-notation to chain the functions, such as:

{{issue.customfield_10463.minus(issue.customfield_10465).multiply(issue.customfield_10466)}}

I believe those process left-to-right rather than in order-of-operations with the {{#=}} syntax.

Kind regards,
Bill

Thanks, the dot-notation worked perfectly.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,158 views 34 44
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