I want to create a risk result based on impact and probability.
Impact/Prob will be select list custom fields, an automation will work out a risk value.
I'm trying to use the Create Variable action, to set a value depending on the Impact selected by the user.
A final action to write the resulting value back to the Issue.
{{#=}}{{RiskProbability|0}}*{{RiskImpact|0}}{{/}}
If I exclude the |0, AFJ throws an error "unknown unary operator *", with the |0, the result is 0 so I believe AFJ is treating the smart variable as strings, is there any way to cast, or another way of fixing this?
Managed to work it out, if anyone is interested.
For the Impacts, I prefixed each with a number. e.g. 1. Low
Create Variable Step:
Variable: RiskImpact
Value: {{Risk Impact}}
Create Variable Step:
Variable: iRiskImpact
Value: {{#=}}{{RiskProbability.charAt(0)}}{{/}}
then in the Edit Field
{{#=}}{{iRiskImpact}}*{{iRiskProbability}}{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.