Forums

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

Automation Triggers with Conditions?

ETC DevOps January 31, 2023

I should note that we're on Jira Software SERVER 8.20.1 and are transitioning to Jira Datacenter.

I have an automation rule that is triggered when issues in a project are transitioned. It then immediately checks if the issue is of a specific type, if it is not the rule bails. This is great and all until I bulk transition 1,700 issues which are not of the issue type called out in the condition of the rule. So the rule is executed 1,700 times and then immediately does nothing. But still, this was 1,700 rule iterations queued up to process at once. 

Is there a way to condition the trigger of a rule so that I can have it not be triggered for processing to begin with? Something like a trigger on transition but only if a field equals a certain value or some other conditioning?

I am in essence asking to be able to do "Trigger AND condition" instead of a nested condition check that only processes after we've already triggered the rule.

I'm not seeing anything along these lines in the trigger options and this stands to be a very good optimization that can improve overall system performance. I had two rules which fired on this bulk transition and it took our server about 2.5 hours to process the automation rule backlog. All because every issue "transitioned" but then immediately bailed out because they weren't the appropriate issue type. But this was a death of a thousand cuts at 50 ms processing time each. This backlog prevented other rules from processing while they waited for the server to get through the batch that were triggered all at once.

This could have been avoided if the trigger determined that the rule should not have been added to the queue to begin with by the additional condition on the trigger of the issue type in this case. I realize that by adding the condition at the trigger point this would incur a processing delay to determine if the rule should be triggered or not, but then the rule is either immediately either in the backlog to process or not which frees backlog space for other rules.

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
January 31, 2023

Hello @ETC DevOps 

For the Issue Transitioned trigger specifically there is no option to add any more conditions than are already available; namely specifying the From Statuses and the To Statuses.

You could have your Jira Administrator contact Atlassian Support to make a suggestion to enhance the available conditions in that trigger.

The additional conditions would have to be built into the trigger functionality. If the "condition" is not part of the trigger, then the rule is triggered and added to the queue to evaluate the components that come after the trigger.

As I see it your only option is to review your automation rules before making any bulk changes and either temporarily disable them or modify the Trigger temporarily so that your bulk changes don't match the trigger.

ETC DevOps February 1, 2023

Which triggers allow you to make additional conditional checks? Maybe we can change our trigger to those instead. We're just looking to see when an issue goes to a specific status.

I'll reach out to support as well and see about a feature request, thanks. I am the admin. :)

Trudy Claspill
Community Champion
February 1, 2023

Issue Transitioned is an example of a trigger that allows additional checks in that you are able to specify the From and To Statuses for the transition, as opposed to having it triggered for every transition regardless of From and To statuses.

The conditions that can be applied to a trigger are relevant to the trigger itself. There are not triggers that let you generically set conditions within the triggers.

You can review the available triggers in the documentation here:

https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/

ETC DevOps February 2, 2023

I see, thank you.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.20.1
TAGS
atlassian, atlassian community, loom ai, atlassian loom ai, loom, atlassian ai, record recaps of meetings, meeting recaps, loom recaps, share meeting recaps,

Loom’s guide to great meetings 📹

Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.

Register today!
AUG Leaders

Atlassian Community Events