Forums

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

Sending email notification if workflow transition does not exist

Benjamin Lee
Contributor
August 27, 2020

What we currently want to do is automatically update a tickets status to "UNDER REVIEW" based on a dev creating a pull request on GitHub. We currently have a single transition which changes the status of "IN PROGRESS" to "UNDER REVIEW". 

I currently have a Workflow trigger that properly handles the change based on a trigger.

However, it is possible that a dev has forgotten to change their ticket to being "IN PROGRESS". For example, it could still be "OPEN".

In this case, there will be no transition, as OPEN -> UNDER REVIEW is not allowed.

In this case, I would like to send an email notification to the developer indicating the issue.

Is there a way I can send an email notification based on this situation? One work around would be to create a transition for OPEN -> UNDER REVIEW, but I would rather not do this. It is preferred to help provide the reminders to the devs on the correct flow they should be using. 

1 answer

1 accepted

1 vote
Answer accepted
John Funk
Community Champion
August 28, 2020

Hi Benjamin,

Maybe you could add an If / Else block to check the status after the trigger fires? If In Progress, then transition the ticket, else send the email. 

Benjamin Lee
Contributor
August 28, 2020

@John Funk thanks for the reply. This is Jira Cloud. Not sure if this matters. I have not seen a place I can do a if/else block. Nor how to send email in the trigger or after the trigger

 

It also dawns on me that I'm essentially trying to identify a "trigger" for a transition that does not exist.  So it would seem that I probably need some form of error handler to capture this case.

I'm not sure if this means I need a webhook or something to do this.

John Funk
Community Champion
August 28, 2020

I also use Cloud.  :-)

Start by reviewing here:

There are two types of automation:

  • Global: In the Free version, you get 100 executions per product, per month
  • Project: In all versions, you get unlimited executions per month

Automation Basics: https://www.atlassian.com/software/jira/guides/expand-jira/automation

You can do this via global rules to apply to all projects also. You'll need to be a Jira Admin/Site Admin, go to Jira Settings > System > Automation Rules (left-hand menu).

For more on using Automation For Jira see these help pages.

Benjamin Lee
Contributor
August 31, 2020

Thanks John, let me read the documentation and see if I can figure something out.

Like John Funk likes this
Benjamin Lee
Contributor
August 31, 2020

@John Funk you are awesome my friend. This did it. I need to still learn a bit more on how to control it, but passed my initial tests. 

I now have to convince folks to get the plugin. We are using DataCenter. But I was testing on Jira Cloud.

Just curious, in case I get shot down ... any viable alternatives that come out of the box in DataCenter?

John Funk
Community Champion
September 1, 2020

Haha - you are too kind, sir.  :-)

There is a Lite version app of Automation for Jira that is Free. You can compare the free vs paid versions (Lite vs Pro) here:

https://confluence.atlassian.com/automation/getting-the-right-version-993924597.html

Suggest an answer

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

Atlassian Community Events