Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to set a specific order of execution of automation rules using auto. rule with trig. IncWebhook?

Andrey Rudnev November 10, 2021

I have three custom fields, each of which is filled in automatically when creating an issue using automated rules with certain values. It is fundamentally important for me to set up a strict order of execution of these automated rules using Webhook. The order of the rules should be as follows: first, RULE 1 is executed, then RULE 2 is executed, and only after successful execution of RULE 2, RULE 3 is executed. According to my knowledge, I understand that each rule should have an action "Send web request" and another one should be created. an automated rule triggered by Incoming webhook. Can someone tell me how to implement your plan?

2 answers

1 vote
Andrey Rudnev November 12, 2021

I will be able to solve my problem like this:

Rule 1

rule a.JPG

Then Rule 2 has trigger "Incoming webhook"

rule b.JPG

Rule 3 also has the same trigger

rule c.JPG

In this way, I organized a strict order of execution of my rules.

1 vote
Bill Sheboy
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.
November 10, 2021

Hi @Andrey Rudnev 

For automation for Jira, the only way I know to enforce the order of triggering for a set of rules is to:

  1. create the conditions in the order you want rules to execute
  2. and if you want one rule to trigger another, set the downstream rule's option to "Allow Rule Trigger"

For #1, that means creating conditions in your rule to make updates which lead to a trigger firing.  For example, if Rule-A updates an issue's fields, Rule-B's trigger checks for the update to the field of interest.

Of note: for such a use case it may be helpful to use the Re-fetch action after the trigger in the downstream rules.  This will reload the data and reduce the chance of timing issues where the issue data has not caught up with the prior changes.

Kind regards,
Bill

Allison Stewart October 14, 2022

I have the same situation.  I do have the "Allow rule trigger" checked on my second rule.  But where do I indicate which rule it should follow?  Can you only do this by webhooks?

If I want to set the webhook, how do I know or create the webhook?

I would guess that I need the URL for "running" the automation, not just the URL for the edit automation page.

I'm on Cloud version.  Will I have access to this?

 

Bill Sheboy
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.
October 14, 2022

Hi @Allison Stewart 

That is not how the option "Allow Rule Trigger" works...When you have multiple rules and the actions of one rule could trigger another, you may enable Allow Rule Trigger in the "downstream" rules of the earlier one(s).

The use case of using webhook to chain/trigger rules is only needed when your rules do not create conditions which can be detected by other rules.  That seems like an edge-case to me, and often this can be solved be re-considering your rule designs.

If you are having a specific problem with rule triggering, please create a new question.  Otherwise only the people following this old thread will see what you are asking.  With your new question, please include the following for context:

  • what is not working as you expect
  • an image the rule causing the problem
  • and an image of the audit log details showing the rule execution

Kind regards,
Bill

Allison Stewart October 17, 2022

I actually combined the 2 rules so that it would run correctly. It's a huge rule, but it works. Thanks.

Like Bill Sheboy likes this
Bill Sheboy
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.
October 17, 2022

Well done!  That is often a better way to go, when possible, as it reduces some timing issues.

The caveat is any branches in a rule: branches which could run on more than one issue are run asynchronously and in parallel.  And so if you need the results of processing earlier in the rule to roll-up some value, that is not possible in one rule with a multi-issue branch.

Like Allison Stewart likes this
Dave Symonds February 14, 2023

@Allison Stewart I got hit by Jira component limitations  - did you get this issue?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events