Forums

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

How to create Jira automation on a field with math expressions

Bijal Patel September 14, 2023

How to create Jira automation on a field with math expressions

For example:

A = (( X + Y + Z ) / B )

All of the fields are numerical fields.

2 answers

1 accepted

1 vote
Answer accepted
David Blank
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.
September 14, 2023

Hi @Bijal Patel !

 

This should just be as easy as adding the fields you want to sum and the mathematical operator (+ and / in this case). So it could look something like:

Rule Trigger: Record Change to fields X,Y,Z

Action: Update Record: Choose your field( Field A)

In the update field use: {{#=}}{{issue.fieldx}} + {{issue.fieldy}} + {{issue.fieldz}} / {{issue.fieldb}}{{/}}

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.
September 14, 2023

Hi @David Blank 

I believe you are missing some parentheses in that expression if you want to match what the question asked.  Thanks!

Kind regards,
Bill

Like # people like this
Bijal Patel September 14, 2023

@David Blank @Bill Sheboy That worked. I just had to tweak it little bit.

i.e.

{{#=}}({{issue.fieldX}} + {{issue.fieldY}} + {{issue.fieldZ}}) / {{issue.fieldB}}{{/}}

 

Thank you for the prompt reply :) 

Like Paul Banfield likes this
David Blank
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.
September 14, 2023

Thank you @Bill Sheboy for catching my error!

 

@Bijal Patel happy to hear it! If I answered your question completely would please mark my answer as accepted so that others with the same question know it worked?

Like Stefan Salzl likes this
1 vote
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 14, 2023

Hi @Bijal Patel 

i recommend to check out the documentation page for math expressions for jira smart values:

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

In case there still open questions don‘t hesitate to ask.

Best
Stefan

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events