I have a custom field (list) A, with values as follows:
1 - Unlikely, 2 - Low likelihood, 3 - Likely, 4 - Very likely, 5 - Near certainty
I have another custom field (list) B, with values as follows:
1 - Minimal, 2 - Minor, 3 - Moderate, 4 - Major, 5 - Unacceptable
Whenever user changes the field value, I need to do the below:
- Extract the number part of these two fields
- Multiply these numbers
- Based on the value, set another custom field C value to either X, Y or Z (eg if the product is between 12 and 20 then set C to "X".
How do I achieve this?
- Can this be done using automation and smart values? If yes, please help me out with the smart value for setting custom field C
- Can this be done using Scriptrunner? If yes, please help me with the script code (i am a newbie so please include the packages to import for the code)
Note:
- This should work no matter how many times A or B value is changed during an issue updation.
- I am using data center version, which means that I don't have the option to create 'variables' in JIRA automation