customize calculation with "project automation"

oda mao June 16, 2022

Hi team,

when customer field A and B update( both of them update or one of them update), then field C = (A +B) *30*9.4646. I tried with below formula:

({{issue. A}} + {{issue.B}}) *30*9.4646, but seems the formula doesn't work. could you help check if anything wrong with my formula?

2 answers

0 votes
oda mao June 16, 2022

hi team,

field C= (A+B) * 30 *9.4646, please help check how to calculate total count of A&B, and then * 30* 9.4646. thanks.

Gaurav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 17, 2022

Hello @oda mao 

Please use th below formula:

{{#=}}({{issue.Custom_Numeric_A|0}} + {{issue.Custom_Numeric_B|0}}) * 30 * 9.4646{{/}}

0 votes
Gaurav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 16, 2022

Hello @oda mao 

For the calculation, the automation requires a specific format. Please use the below format, which works fine.

{{#=}}{{issue.Custom_Numeric_A}} * {{issue.Custom_Numeric_B}} * 30 * 9.4646{{/}}

Also, how to handle the scenario if either field A or B is empty (shows None), the rule will fail in that case. To handle this, we can default the values to 1; which can be performed as:

{{#=}}{{issue.Custom_Numeric_A|1}} * {{issue.Custom_Numeric_B|1}} * 30 * 9.4646{{/}}

Here, if either field A or B is empty, it will be considered as 1 and the value for C will be calculated. This can be updated as per your requirements.

Let me know if this helps resolve the issue.

Regards

--GG

Gaurav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 17, 2022

To Add the custom filed prior to multiplication use:

{{#=}}({{issue.Custom_Numeric_A|0}} + {{issue.Custom_Numeric_B|0}}) * 30 * 9.4646{{/}}

Suggest an answer

Log in or Sign up to answer