How can I reorder Automation for Jira rules?

Nathan Given September 16, 2019

I'm using Automation for Jira Cloud Lite and trying to reorder rules (I want some to execute after others).

 

Is this possible?  When I hover over a rule I see that there is a selector, but when I drag and drop I just get a not allowed symbol:

 

3 answers

1 accepted

2 votes
Answer accepted
Brydie McCoy (CB)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 16, 2019

Hi Nathan,

The order that rules run in is non-deterministic.  We don't/can't guarantee which order they will execute in.  We do have a feature request open to be able to specifically trigger one rule from another: AUT-534 but it will be a while before we can get to this.

Is there a particular reason you would like them to run in a particular order?  Perhaps there is another solution that might help.

Cheers,
Brydie [Automation for Jira]

Nathan Given September 16, 2019

Hi,

Thank you for your response.

Right now I have three rules I'm dealing with:

  1. Trigger: On Transition; Action: Perform another transition
  2. Trigger: On field change; Action: change priority
  3. Trigger: On Transition, if assigned team = "Command Center" and "Priority = 1" then call a webhook during transition

Thus, I really want the change priority rule to execute first, then I want the transition rules to fire, then I want the webhook rule to fire.

I think things are working okay right now, but I was just nervous about knowing the order and helping enforce an execution order.

Thank you,

Nathan

Brydie McCoy (CB)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 16, 2019

Hi Nathan, 

A couple of questions,

1. Are rules 1 & 3 listening to the same transition or different transitions?
2. Is it possible to change the field for rule 2 during the transition (e.g. on a transition screen?

Thanks,
Brydie

Nathan Given September 18, 2019

@Brydie McCoy (CB) - yes, I will combine a few of these together.

 

I was just trying to modularize a few of my rules so that one rule will update a field (the priority) and another rule will notify teams if the priority is a "1".

Modularizing the rules makes them reusable, and if I can trust them to run in a certain order, it allows my rules to be short, sweet, and to the point.

For now I will take your answer into consideration and write my rules in a way that forces actions to run in the order that I want.

Thank you for your help, this add-on is a super big help for us.

1 vote
Adam Brown May 3, 2021

I handled this by creating a custom field that is buried and not accessible from any screens. The first rule will update this field at the end of the execution. The field update will trigger the 2nd rule. I suppose using some combination of the approaches above, you could set a condition for priority order, and then once the field update is triggered set a condition, "If customFieldName = 2", then execute 2nd rule. Something like that would work.

In addition, even if anyone did manage to revive this field, you could set a date/time condition so that it occurs X number of days/hours/minutes(?) from the initial execution, assuming you stamp that out somewhere.

0 votes
Raynard Rhodes September 16, 2019

I do not believe these are not run by the order they are in. You also have the option to use "Add Label" to the left side to group rules together. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events