Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,361,696
Community Members
 
Community Events
168
Community Groups

Jira Automation - Send email to different recipients depending on conditions

Hi,

 

I have a JIRA automation rule, based on a field (lets say it can be the project), I wish to send the same email, but to different persons (lets says on each project manager).

 

By example:

Project A -> marc@company.com
Project B -> tom@company.com

Is there a way to do this ? ( Or should I create a rule for each project :-( )

Thanks

1 answer

1 accepted

3 votes
Answer accepted
Alex Koxaras Community Leader Sep 21, 2022

Hi @christophe demez 

Since you are on a free plan, you could download an app like JMWE, which has a "send email" post function.

You can:

  • Create a project role called e.g. "project manager"
  • On each project, grant this role to the corresponding project managers
    • Project A -> marc@company.com
    • Project B -> tom@company.com
    • Project C-> Santa Clause, Peter Pan, Smeagol
  • On the workflow(s) of the issue type(s) you want this email to be sent, add a post function on the transition you want this to happen
  • On the "send email" post function, you will compose your email, and choose as recipient the role "Project Manager"
  • Publish your workflow
  • Now as long as you grant project membership to project managers, when the issue passes from that transition, an email will be sent to each project manager belonging to the corresponding project
  • So for example if you have an issue who uses this transition on project A, then the email will be sent out only to Marc. If another issue transitions on project C, then email will be sent out to the (finctional) characters I mention earlier.

In my opinion this would be the best approach.

Thanks, but I can't add application. It is an due to internal policy.
I have to manage this case with the standard automation ;-)

Thanks

Alex Koxaras Community Leader Sep 21, 2022

But you are on a free plan. Can't really understand the internal policy, but ok.

If you want to make this happen with Jira automation:

  • Create a global rule,
  • and add conditional statements (if/then/else).
  • On every if you have to compare the Project:
    • If project is A
      • Send email to Tom
    •  If project is B
      • Send to Mary
    • If project is C send to lalala
    • and so on and so forth...

Thanks, but it is not possible to have multiples if, by using this:

Untitled.jpg

At the end if result in something like this

if (project A)
{
  SendMail(..)
  if (project B)
  {
    SendMail(..)
  }
}

But there is no way to have this (what you propose):

if (project A)
{
  SendMail(..)
}

if (project B)
{
  SendMail(..)
}

Alex Koxaras Community Leader Sep 22, 2022

You are using the Issue Fields condition, and not the If/Else component.

IfElse block.png

Like christophe demez likes this
Alex Koxaras Community Leader Sep 22, 2022

@christophe demez let me know if you got this working.

I have try the following, by using the "if/else" component.

I have the status: backlog -> analysis -> prioritization -> ...
In some cases, I wish to transit from backlog to prioritization (or further).

I do the following:

Untitled.jpg

My problem is that the issue transit from "backlog" to "analysis".
But it does not transit from "analysis" to "prioritization" (and further).

I do not understand why :-( do you have any idea ?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

5,079 views 18 32
Read article

Atlassian Community Events