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 @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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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 :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.