The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new comments.

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