Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Error when calculating via Automation. Too many numbers or variables

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?

1 answer

1 accepted

1 vote
Answer accepted
Pramodh Community Leader Feb 06, 2021

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

 

Automation_1.png

 

Thanks,
Pramodh

Hi @Pramodh !


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?

Pramodh Community Leader Feb 06, 2021

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

Pramodh Community Leader Feb 06, 2021

FYI, Divide it by a thousand!

I think it should be divided by ten thousand, but somehow this is not correct ((

Pramodh Community Leader Feb 06, 2021

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)
Pramodh Community Leader Feb 06, 2021

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..

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
Like # people like this
Pramodh Community Leader Feb 06, 2021

Great!

Like Stuart C likes this

Suggest an answer

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

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you