I have 2 Customfields as Severity and Occurrence. These 2 customfields are dropdown fields. It Contains
Severity contains the dropdown values as(Negligible, Minor and Major).
Occurrence contains the dropdown values as (Critical, Probable and Improbable)
Score is the numeric customfield to store the multiplication of both severity and occurrence
Ex:
Scenario 1:
If user selects
severity as Negligible (Internally it assumes as 1)
Occurrence as Probable (Internally it assumes as 2)
So in score the result will calculate as 1*2=2
Scenario 2:
If user selects
Severity as Major( Internally it assumes as 3)
Occurrence as Critical(Internally it assumes as 1)
So in score the result will calculate as 3*1= 3
Expected output:
We took 2 customfields as dropdown list and we are expecting the output as multiplication of both customfields as Numeric. And this numeric maltiplication calculation of both dropdown list will happen internally. Eralier we have severity and occurrence both as numeric but now both are changed as dropdown list.
Could you please help in this
Hi @thumuluru_shreya ,
One way you could do this is by using Lookup table actions for 'mapping' select list options with specific (number) values.
For example, create two lookup tables for each select list field (one for Severity and one for Occurrence):
And then, assuming 'output' field is a number type field, you can use automation math expressions to calculate desired value:
In this example (as stated in your question), I've simply multiplied Severity * Occurrence values by using the following expression:
{{#=}}{{severity.get(issue.customfield_10367)}} * {{occurence.get(issue.customfield_10368)}}{{/}}
Of course, you can name those Lookup tables as you wish, and you need to use appropriate custom field IDs for Severity and Occurrence field that you're using.
Hope this helps.
Cheers,
Tobi
@Tomislav Tobijas _Koios_ , Thanks for helping.
I didnt get any ouput for this. Could you help in this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@thumuluru_shreya can you share some screenshots of automation rule and actions you're using (together with smart values and expressions within the rule)?
Additionally, I would suggest using Log action to check out smart values, calculations, outputs and any other values you can get within the automation rule to debug rules which you're testing.
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.
@thumuluru_shreya can you confirm those are correct IDs for severity and occurrence custom fields? Also, as you stated, these fields are single select custom fields?
👉 I would suggest creating additional log actions for both {{issue.customfield_10324}} and {{issue.customfield_10325}} to see if you're getting correct values there.
Also, can you provide screenshot(s) of rule audit log afterward?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you confirm those are correct IDs for severity and occurrence custom fields?Correct Also, as you stated, these fields are single select custom fields? Yes, Dropdown with single select
👉 I would suggest creating additional log actions for both {{issue.customfield_10324}} and {{issue.customfield_10325}} to see if you're getting correct values there.- Could you please explain with steps
Also, can you provide screenshot(s) of rule audit log afterward?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@thumuluru_shreya thanks!
As for logging values for custom fields, I was thinking of adding two Log actions.
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.