Split an automation rule in multiple parts and run the whole sequence of rules
Asked by Ward Schwillens_ Schwillie:

Hi There,

I have an automation rule that creates Epics and Tasks within the Epics in a project, and also does some other stuff. It's quite good and saving our project manager lot's of work. It results in a nicely structured project setup in Jira:

![2024-06-20 generated Epics and Tasks project structure.png](/t5/image/serverpage/image-id/330917iB470403797ED68B7/image-size/large?v=v2&px=999 "2024-06-20 generated Epics and Tasks project structure.png")

Now since there are quite some tasks to be setup in our projects, and I also need to create and use some smart values in this rule, I am nearing the 65 components that are allowed per rule.

![Long automation rule.png](/t5/image/serverpage/image-id/330920i37C237FB10862D69/image-size/large?v=v2&px=999 "Long automation rule.png")

So I heard about splitting automation rules, and that makes sense. This rule is triggered manually. If splitted in multiple parts, how can I have this rule triggered so the parts run in the correct sequence? I did not find a Trigger Rule action that can be used in a component.

Thus my question: how can one manually started automate rule trigger the next one in a last action component, or in any other way.

Thank you for your insights and suggestions!

Summer is coming ?


Answers:
author: Mikael Sandberg
body: This can be done if you set up your new rules to be triggered via web request, and then make the call to it from the main automation.

I have several automations that is set up this way, my main automation is basically a dispatch that sends web requests to trigger other automations.

comments: author: Mikael Sandberg
body: You can also chain automations this way, for example if you have one that triggers on issue create it can then trigger the next one by sending a web request to it and so on.


author: Bill Sheboy
body: Hi [@Ward Schwillens_ Schwillie](/t5/user/viewprofilepage/user-id/1028001)

Yes, and...to the suggestion by Mikael:

The key to using chained rules with the Incoming Webhook trigger is *each rule must only perform sequential processing*. That is, there can be no branches which lead to parallel processing, or the next rule could start earlier than expected. The reason is...

Branches which could be on more-than-one-thing (e.g., on JQL, on linked issues, advanced branches, etc.) run in parallel and asynchronously. There is no guarantee of when the branch will complete, up until the end of the rule.

And so if the last rule step was the Send Web Request action to trigger the next rule, that could run before the prior branch completes.

Kind regards,  
Bill


author: Trudy Claspill
body: Oh, I didn't think of using the Send Web Request action! Brilliant!


author: Aron Gombas _Midori_
body: While I agree with [@Mikael Sandberg](/t5/user/viewprofilepage/user-id/853579)'s answer, it seems to me that you are implementing a "smart clone" functionality using complex automation rule, while there are [apps built *specifically* for that use case](https://marketplace.atlassian.com/search?query=clone&product=jira&hosting=cloud)...

Have you eventually tried those? (I am not saying that they are better, just something that may be relevant here.)


author: Trudy Claspill
body: Hello [@Ward Schwillens_ Schwillie](/t5/user/viewprofilepage/user-id/1028001)

There is not specific facility for triggering automation rules in a sequence.

Unfortunately I'm not able to get clear text details when I try to zoom in on your rule image to see what you are actually doing in it.

But, generally speaking, what you have to do is add some some flag/custom value into an issue that you created/updated in one rule that can be detected by the trigger or a condition of the next rule in the sequence. So if your rule is creating epics and stories under Epics, you could add a label to the Epics as they are created such that the next rule is triggered by creation of an Epic with a condition to check for the label and create child issues if the label is present.


Tags: automation

cloud

jira-cloud