Run automation rule from transition

Benjamin Peikes September 24, 2021

Seems like one of the first things that Jira should support is running an automation rule from a transition, but I can't seem to figure out how to do it.

I believe that I could do it the following way, but it seems like a total hack:

1) Create an automation rule which is triggered from an external webhook

2) Add a webhook to our system that points to the automation rules webhook

3) In the post function of the transition, run an "external webhook", which just points to our automation webhook. I'm not sure if the hooks are compatible though.

Thoughts?

2 answers

0 votes
Tansu Akdeniz
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 26, 2021

Hi @Benjamin Peikes

In automation page, there is trigger called "Issue Transitioned". Selecting from and to statuses should solve your issue. Selecting a specific transition (with id) is not supported.

Benjamin Peikes September 26, 2021

Thats exactly the issue. If you have a transition which goes from and to the same status, ie what is now called an “action” in the UI, this doesnt work.

I dont understand how Atlassian implemented Automation, and didnt make it available from transitions.

Like # people like this
Michael Aglas May 12, 2022

it is truly a pain as you can have several transition from an to the same statuses... so...

Like # people like this
Scott Petersen February 15, 2023

Have there been any updates to this?  Seems useful to have

Like Anne Forstner likes this
0 votes
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.
September 24, 2021

Hi Benjamin,

What do you mean by a transition? When an issue transition from one status to another? 

Benjamin Peikes September 26, 2021

Yes and no. We have “transitions” which map from any status back to the same status. The fact that Automation cant be associated with a transition is pretty ridiculous.

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.
September 26, 2021

Well, Automation certainly CAN be associated with a transition. You can create a rule with a trigger for Issue Transitioned and select the to and from statuses if you like. 

Benjamin Peikes October 3, 2021

The issue is that it cant be associated with a specific transition, it can be associated with a start status and an end status, so if you have two “transitions” from one state to another, you can’t have the automation rule run on one of them.

I dont understand why Atlassian didnt make running an automation rule as an option for Post functions in a workflow.

Like Dimitrios Moschovitis likes 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.
October 3, 2021

I think they are aware of that situation and probably have it in their backlog to make the fix. First, realized that Atlassian didn't create the app - they acquired it in the last couple of years and their will be things to work through. 

Second, what I do in those cases is set a value of a custom field that can then be used to trigger the rule instead of the actual transition. Should I have to do that? No. Does it work? Yes. 

I hope that helps a little. 

Edgar Kellermann _TNG_ July 27, 2022

As a workaround, you can also use a custom event in Jira. 

That means:

  • Create a custom event globally.
  • Let your transition fire this custom event in its post functions.
  • Use the event trigger in the Automation and listen to your custom event.

That should work the same way as listening to a transition, which unfortunately still doesn't exist in Automation.

Like John Funk likes 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.
July 27, 2022

@Benjamin Peikes  - Any update here?

Benjamin Peikes July 27, 2022

Not that I know of. Maybe submit a formal request for the feature. If you do, and they give you a link to an improvement that we can vote on, I’d be happy to add my vote.

That said, I wouldnt hold my breath, as I dont think Atlassian has classic workflow improvements on their priority list.

Lukas Ortner October 12, 2022

Hi,

I had a similar request and maybe it helps you. We wanted to implement shortcut buttons that send out different comments when used. By using several transitions to the state itself you get the Actions Menu as Benjamin Peikes already mentioned. However differentiating the transition was my problem as well. I tried Edgar Kellermann's solution with the generic event but could not solve the last part in the automation. 

The current solution we use is making for each Button/Transition, as in the actions menu, an automation rule that posts e.g., wished comment directly on the issue and the trigger is the Manual trigger. In the Issue View under Automations you can select wished automation to the thing you want (in my case it's a comment, could be also a transition,... you name it). The manual trigger can also restrict which user groups can trigger this automation

Screenshot from 2022-10-12 13-44-36.pngScreenshot from 2022-10-12 13-45-48.pngScreenshot from 2022-10-12 13-46-40.png

cheers

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