I'm looking to create a smartvalue that would say:
If (field.match(".+Multiple.+")) Then 20 Else 2
I could do:
{{#if(issue.field.match(".+Multiple.+"))}}20{{/}}
however I don't know how to do the fallback value.
Is this possible with a smart value?
FWIW, I already know I can do this in Automation with an If/Else.
I used the double-if and it seems to be working.
{{#if(equals(issue.issuetype.name, "Large"))}}10000{{/}}
{{#if(equals(issue.issuetype.name, "Program"))}}10002{{/}}
Hi @Chad Waldman ,
Ternary expressions aren't supported in Smart Values at the moment.
To achieve what you're looking for there are a couple of options:
Hope that helps,
James
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the suggestions.
I am not following your first recommendation. Can you please write an example.
For your second suggestion, are you recommending:
{{#if(issue.field.match(".+Multiple.+"))}}20{{/}}{{#if(not(issue.field.match(".+Multiple.+")))}}2{{/}}
I haven't tried two conditionals in one expression but this sounds interesting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I needed to put an email address (created from values in the issue) into the ticket comment, but needed to use 2 different logics to create the address based on whether there was a middle initial (customfield 12034 in this example). I followed the 2nd suggestion above and came up with something like this. What I am trying to figure out is how to get them all in one line/statement so the answers don't appear spaced differently depending on the logic.
{{#if(equals(issue.customfield_12034.value,"NA"))}}Email Address: {{issue.customfield_11884.left(1)}}{{issue.customField_11885}}@kennedy-center.org {{/}}
{{#if(not(issue.customfield_12034.value,"NA"))}}
Email Address: {{issue.customfield_11884.left(1)}}{{issue.customfield_12034}}{{issue.customField_11885}}@kennedy-center.org {{/}}
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.