How can I calculate the average of three dropdown values ranging from 1-5 and display the result in another dropdown or output field?
Here is an example of 3 criteria (Item A, B & C), each ranging from 1 to 5. The user will define the 3 criteria, and the relevance score will automatically calculate the average of the 3 criteria to output the result. (round off to the nearest whole number)
Is there a simple way to take an average and output the action on JIRA?
Thanking you in advance for your support!
Prabhav
Hi @Prabhav Mhapne -- Welcome to the Atlassian Community!
You could do that with an automation rule or with a marketplace addon for scripting if you have that.
To do this with automation rules, you may want 2 rules: one triggered on issue create and another triggered if any of the 4 fields change (the inputs or if someone manually overrides your average value), and then use the math functions to calculate the result: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/
For example:
{{#=}} ROUND( ( {{issue.ItemA.value|0}}+{{issue.ItemB.value|0}}+{{issue.ItemC.value|0}} ) / 3, 0) {{/}}
One key thing is to confirm you have the correct smart values for your fields. This how-to article can help with that: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
To get you started on creating your rule, please refer to these documentation and example sources:
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.