Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Jira Smart Values - conditional logic with multiple values

Rodri Alvarez February 21, 2022

Hi there,

I have a list that contains multiple options. Each option is for a particular team.

I'm trying to send an automatic message with all items selected in this list + adding the email address of the team in charge of this particular option. in some cases, same team is doing multiple options. My original code was this:

{{#issue.customfield_16302}}
{{#if(equals(checked, true))}}- {{name}}
{{#if(equals(name, "option1"))}}name1@domain.com{{/}}

{{#if(equals(name, "option2"))}}name2@domain.com{{/}}

{{#if(equals(name, "option3"))}}name3@domain.com{{/}}

{{#if(equals(name, "option4"))}}name3@domain.com{{/}}

{{#if(equals(name, "option5"))}}name3@domain.com{{/}}

{{/}}{{/}}

 

It worked, but I've observed each "if" is adding an empty line in the email generated, making the email full of empty lines.

 

I've tried this code in order to put in a single line all options that has the same team assigned:

{{#issue.customfield_16302}}
{{#if(equals(checked, true))}}- {{name}}
{{#if(equals(name, "option1"))}}name1@domain.com{{/}}
{{#if(equals(name, "option2"))}}name2@domain.com{{/}}
{{#if(equals(name, "option3", "option4", "option5"))}}name3@domain.com{{/}}

{{/}}{{/}}

 

But it didn't print anything. It didn't fail either.

 

Any suggestion? I've tried with OR. No luck 

 

Thanks

 

1 comment

Comment

Log in or Sign up to comment
Adam Gołaszewski
Contributor
March 1, 2023

Hi, what usually helps is to uncheck this box ;)

2023-03-01_16h31_06.png

TAGS
AUG Leaders

Atlassian Community Events