Hello,
I'm trying to take a money value within a custom field and look against a range to return the number back from it.
For example:
customfield <= 1000 return 1
customfield <= 10000 return 10
customfield <= 100000 return 100
If I take the custom field on its own issue.customfield_11073.asNumber I get 1566.0
In automation if I create a variable, and add this as a smart variable I get nothing back (blank variable)
{{#=}}{{issue.customfield_11073.asNumber <= 100000.0 ? 2 : 0}}{{/}}
Can anyone give me a steer in the right direction. Thank you
First, I recommend pausing the review the docs for conditional expressions and math expressions as your syntax seems incorrect.
Next, you appear to want the order of magnitude value in thousands. That should be possible using a combination of the following functions: log10, min, max, and the power operator ^
I recommend solving this incrementally with test values, writing the results to the audit log. You will also need to decide what should happen at edge cases, such as empty, negative, and zero values, or out-of-range values for rule math.
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.