Does anyone knows whether Jira automation supports combining smartvalues with math and logic operators?
I tried to use a simple (if) with a (+) to test it but it was not behaving as expected (or lack of skillfulness on my side is also likely). Documentation is not super robust on this topic ...
I wanted to achieve a formula that should be more or less on this level of complexity:
[0,5*[({{customfield_1}} - 1 )/4] + 0,5*MIN(COUNT({{customfield_2}}),1)]
/(1/5)*[(if:({{customfield_4}},"value1")
else if:({{customfield_4}},"value2")
else if:({{customfield_4}},"value3")
else if:({{customfield_4}},"value4")]
I started by using calculated field, the problem is that it only allow for (+)(-)(*)(/) operations, and I have a multiple-selection field that needs to be binary, 1 when anything is selected and 0 when null.
Hi @Tomas Franco -- Welcome to the Atlassian Community!
Without seeing your actual rule or calculations...
Yes, math and logic operations may be combined n automation rules. Your scenarios specifics, and how you want to use the results, may determine what is possible.
For example, expressions like these are possible:
{{#=}}{{issue.someField}} + 0{{#if(some condition)}}{{some smart value expression}}{{/}} {{/}}
{{#if(some condition)}}{{#=}}some math expression{{/}}{{/}}
Additionally, Lookup Tables can help to provide a key / value mapping to reduce the need for some conditionally logic:
{{#=}}{{issue.someField}} * {{tableMyTable.get(issue.anotherField)}}{{/}}
For more specific suggestions, the community would need:
Kind regards,
Bill
Welcome to the community!
Looks like the logic expressions are limited. You will have to use the "if/ese" condition and on each branch include the edit action.
I hope this helps.
Fabian
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.