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.
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}}{{/}}
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.
BestStefan
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
@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
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?
It looks like you're new here. Sign in or register to get started.