Multiple issue fields conditions with multiple email notifications in one automation?

Matt Crist December 2, 2021

Here's my scenario:

I am working with multiple sites. Site name is a field I can use for creating rules.

So, IF Site Name = X, THEN I want emails to go to a certain group.

IF Site Name = Y, THEN I want those emails to go to a completely different group.

 

I have tried to set up a single automation as follows:

Rule

Result

Rule 

Result

Rule Result

 

So...

IF Site name = X

THEN, Send email to 'List A'

IF Site name = Y

THEN, Send email to 'List B'

IF Site name = Z

THEN, Send email to 'List C'

 

Unfortunately, my automation didn't work. Is what I'm trying to do possible, and if so, any advice on what could be the problem?

Thanks!

1 answer

1 accepted

0 votes
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2021

Hey Matt,

You probably need to create a series of IF/ELSE logics with the email created each time with different email list. 

You can't copy the send email object in automation, but you can copy and past the email test which should make that go quicker. 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 2, 2021

Hi @Matt Crist 

Yes, and...to what John suggests:

I wonder if your email message is identical for the different sites, with only the List A, B, etc. different for the recipients.  If so, you could use the IF/ELSE described by John to set a created variable to the recipients, and then use one action to send the email.

To go one step further...if your sites and lists are stable, you could use entity properties to key/value to the site name/list, and then this would be a lookup to get the recipients.  Of note: you would want to investigate a better entity property handler than what is available with out-of-the-box Jira.

Kind regards,
Bill

Matt Crist December 2, 2021

Yes, the email is exactly the same each time. In the subject line, I am using the following dynamic value: {{issue.fields.summary}}. 

The sites and list are fairly stable, but they could change if a new site is added (infrequent) or an employee needs added/removed (more common, but not necessarily frequent).

Thanks to you both for the suggestions!

Like Bill Sheboy likes this
Matt Crist December 2, 2021

I'm not seeing If/Else in here. Is that something I have to configure for it to show up here? Or am I looking in the wrong place?

 

Jira1.pngJira2.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 2, 2021

Matt, would you please show an image of your complete rule?

I believe the image you posted for condition test options only appears when inside of a branch, and so if/else is not permitted at that nesting depth.

Outside of a branch you should see all of the options for conditions.

Thanks!

Matt Crist December 2, 2021

Hi Bill,

This may be overkill, but I wanted to make sure you can see what you;re looking for, so I included several screenshots for your reference here...

Thanks!

1)

Jira7.png

 

2) 

Jira6.png

 

 

3) 

Jira5.png

 

 

4)

Jira3.png

 

 

5)

Jira4.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 2, 2021

Thanks!  Yup, that is what I expected was causing this.

In general, you only need the branch For Current Issue if you are using a single condition test *and* want processing to continue after some processing.

For your rule to do what John suggested and following your example, please try this:

  • trigger: issue created
  • action: Re-fetch (to handle the possibility of timing errors not having the data ready to test after the created trigger)
  • if/else condition...issue condition: status is Done
    • action: do something A
  • else-if condition: status is In progress
    • action: do something B
  • ...repeat as needed
  • else
    • action: do something Z
Like John Funk likes this
Matt Crist December 2, 2021

Thank you! So, am I on the right track now?

Jira8.png

Like # people like this
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2021

Yep, that’s the right path

Like Bill Sheboy likes this
Matt Crist December 2, 2021

Awesome! Thanks for all your help!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events