Can automation compute an algebraic expression using multiple custom field values?

Jordon Martig February 3, 2023

Can automation compute a math expression using multiple custom field values and take into account the order of operation? I am attempting to compute the following expression via automation. Each of the terms are custom value fields within the issue. 

(Units Consumed * Actual Unit Price) - (Cost Model Anticipated Units x Actual Price)= Custom Field Value. 

1 answer

1 accepted

2 votes
Answer accepted
Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2023

@Jordon Martig, yes, this is possible!

I would check out this documentation, but the general process would look like this -

{{#=}}({{issue.Units Consumed}} * {issue.Actual Unit Price}}) - ({{issue.Cost Model Anticipated Units}} * {{issue.Actual Price}}){{/}}. 

 

You would want your trigger to be set to "Field Value Change" and then have the rule listen for the 4 fields in your equation.

Jordon Martig February 3, 2023

Thanks for the info Kian. When I am trying to publish the rule, it is returning the following error: "Error parsing template: Failed to close '=' tag"

Jordon Martig February 3, 2023

Capture.JPG

Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2023

Ah! My apologies. While I was typing it in I missed a "{".

It should be this:
{{#=}}({{issue.Units Consumed}} * {issue.Actual Unit Price}}) - ({{issue.Cost Model Anticipated Units}} * {{issue.Actual Price}}){{/}}.

I'll edit the original answer to include the correct string as well!

Jordon Martig February 3, 2023

that worked. Thank you so much for the help!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events