Hi,
I have a Team managed project in JIRA. It has 2 list type custom fields - Impact and Probability, which have numbers in the dropdown.
I would like to multiply the selected value of the 2 custom fields and save them in another field (Score)
Score = Impact * Probabilty
However, I am unable to make this work using Automation and Smart Values. Please help! Thank you in Advance.
Hello @gowri.kumar
There are a couple of alternate options to achieve this, apart from the option suggested by @Pramodh M
1. If the values for Impact and Probability are pre-defined; then you can create an If-Else construct in the Automation and define the value of Score, as you would know the options beforehand.
2. If the values es for Impact and Probability are not pre-defined; then you can create automation as per the below screenshot.
Please share in case you need further support.
NOTE: Impact is a common field that can cause an issue. To avoid that, I have used Impact1 as temporary workaround.
Hi @Gaurav
In this case it just returns empty value, even though the audit log shows success
Result:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @gowri.kumar
Kindly share the screenshot of the automation rule. I have tested the rule which I shared and it worked fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Gaurav.
Please find the screenshot of the rule below. Also, do note that the fields belong to a Team managed project and they are List type custom fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @gowri.kumar
For the drop-down field types, it can be simply set as the below screenshot.
Kindly accept the answer if this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gaurav ,
Thank you once again. It works now!
I had to change the name of the custom field 'Impact'. If I name the field 'Impact' it still has this problem. not sure why though.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @gowri.kumar
Welcome to the Community!!
Trigger - Field Value Chaged (Probabilty, Impact )
Edit - Field value (Score)
{{#=}}{{issue.Probabilty}} * {{issue.Impact }}{{/}}
Reference here
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/
https://support.atlassian.com/cloud-automation/docs/examples-of-using-math-expression-smart-values/
Thanks,
Pramodh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately I already tried that and received the following error in Audit log:
Error rendering smart-values when executing this rule:
Unknown unary operator * at character position 1: *
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Pramodh M
I think the above formula you have mentioned would also work as long as the field name is not 'Impact'. The issue seems to exist with the custom field name (Impact) and not the formula itself.
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.