When creating a new task through Automation, the data should be calculated using the formula:
{{# =}} ({{issue.field_1}} * 0.4 + {{issue.field_2}} * 0.5 + {{issue.field_3}} * 0.6) / {{issue.field_4} } * 100{{/}}
Where fields 1-4 are filled in when creating a task
Gives an error message :
Error rendering smart-values when executing this rule:
Too many numbers or variables: (2 * 0.4 + 1 * 0.5 + 3 * 0.6) / 4 * 100
Where did I go wrong?
Hi @Alexander
Please follow the following change and please let me know if this works
({{issue.field_1}} * 0.4 + {{issue.field_2}} * 0.5 + {{issue.field_3}} * 0.6) / {{issue.field_4}} * 100
Thanks,
Pramodh
Hi @Pramodh M !
This works, but it will only output incorrect data: instead of, for example, "0.011142857" it produces "111.429"
Fields 1-4 are of type "Select List (single choice)"
Field 5, where data is output "Number Field"
Could it matter?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, since your input is a number, you can have Fields 1-4 as number fields. Well, it should work for the Single select list as well. Divide it by a hundred and we will get the result, I do not guarantee about the decimal places it results in,
(({{issue.field_1}} * 0.4 + {{issue.field_2}} * 0.5 + {{issue.field_3}} * 0.6) / {{issue.field_4}} * 100) / 100
Thanks,
Pramodh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FYI, Divide it by a thousand!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for the mistake, here's the correct one.
(({{issue.num_field_1}} * 0.4 + {{issue.num_field_2}} * 0.5 + {{issue.num_field_3}} * 0.6) / {{issue.num_field_4}} * 100 / 10000)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you please send me the screenshot of the math solution by one example. BODMAS is hitting here! we may solve this with fewer operations..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here it works:
({{issue.num_field_1}} * 0.4 + {{issue.num_field_2}} * 0.5 + {{issue.num_field_3}} * 0.6) / {{issue.num_field_4}} * 100 / 10000
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.