Jira Automation - Send email to different recipients depending on conditions

christophe demez September 21, 2022

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 _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 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.

christophe demez September 21, 2022

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 _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 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...
christophe demez September 22, 2022

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 _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 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 _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 22, 2022

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

christophe demez September 22, 2022

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
AUG Leaders

Atlassian Community Events