Cascading rules?

Brandon Lawler February 27, 2019

Hi guys,

I'm new to the plugin Jira Automation and I'm missing a tool that I feel should be here. I need to fire automation rules off of other rules, but not in response to any particular event that occurs in a field in the issue--I need the rules themselves be able to cascade off of each other. I'm looking for an action along the lines of "Fire another Jira Automation rule: _____". A single rule may need to do several of these in sequence. Is there a way I can do this?

2 answers

1 accepted

0 votes
Answer accepted
Deleted user February 27, 2019

Hi Brandon,

Thanks for your question. Are you using Cloud or Server? It is not currently possible in Cloud but it is possible in Server.

Cheers,
Simeon [Automation for Jira]

Brandon Lawler February 27, 2019

Cloud. Oh well. :)

Deleted user February 27, 2019

Hi Brandon,

Sorry about that! We have an improvement open around this, https://codebarrel.atlassian.net/browse/AUT-534, however it may be some time before we get to it.

Cheers,
Simeon [Automation for Jira]

Brandon Lawler February 27, 2019

I found a workaround, and it works!

I created a new field I'm calling "Hidden Rule Trigger". My parent rule makes two edit actions at the same time, one to set the value to "TRIGGER_1" and another to set the value to "TRIGGER_2".

A second rule, listening for changes to this field, is fired twice. I have if-then statements watching for {{issue.hidden rule trigger}} = "TRIGGER_1" and another watching for {{issue.hidden rule trigger}} = "TRIGGER_2", and each firing of the listening rule delivered the action associated with the appropriate trigger.

As long as this field is hidden from all screens, fired with unique strings, this works exactly like rules cascading and firing each other arbitrarily.

Kirby Knight March 5, 2019

Hi @[deleted],

What are the steps to do this in Server? This is exactly what I'm looking to do, but I can't figure it out.

I'm guessing that part of it is checking the Allow rule trigger checkbox on the subsequent rule, but I don't know what to do on the first rule to cause the second to fire.

Thanks,

Kirby

Deleted user March 5, 2019

Hi Kirby,

There are two strategies you can use. The first you've already stumbled upon, allowing rules to trigger other rules. You have enabled that checkbox, now the effects of one rule (eg editing an issue) can trigger off another rule - say with an issue updated event, etc. I believe some people use such a strategy to deal with not enough hierarchy issues.

The second is that in server we have an action called Publish event that you can use to publish custom events. You can also listen to custom events with the multiple events trigger.

Cheers,

Simeon [Automation for Jira]

Brandon Lawler March 5, 2019

@[deleted]  By the way, I discovered a limitation to the solution I described a few days ago for Cloud.

What does work: within a rule that you want to trigger another rule from, populate/change a field with a keyword. The second rule should listen for the keyword in that field, which will trigger the cascaded second rule.

What does not work: triggering this within a branch on multiple issues. If, in a branch, I change a field on all linked issues, the field will change but will not trigger any events based on that field changing values. I also experimented with other fields, such as work log--it appears that any actions dynamically triggered within a branch in a rule will modify the values, but will not trigger anything that listens for those changes.

Deleted user March 5, 2019

Hi @Brandon Lawler,

Have you checked "Allow rule trigger" on rule details page of the rules you want to be triggered?

If so, could you raise a support ticket into this and we can look into it further.

Cheers,

Simeon [Automation for Jira]

Like Brandon Lawler likes this
Brandon Lawler March 6, 2019

You know, that was probably what I missed--I have already implemented differently but I expect that I forgot to check for that. Thank you for the reminder.

Like Deleted user likes this
Tom Lister
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 30, 2019

Hi

I have a similar issue.

I have created a custom event 'Rule 1 Completed'.  But when I try to fire it from the rule it does not appear in the list of available events. Anyone know why?

Tom

Deleted user July 30, 2019

Hi Tom,

It should show up, can you try refreshing your browser session and see if that resolves it.

If not, could you open a support ticket?

Cheers,

Simeon.

Tom Lister
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 31, 2019

Hi @[deleted] 

The event has turned up now. Even though yesterday I left and reentered the page several times hoping it would refresh the list.

Thx

Tom

Deleted user July 31, 2019

Hey Tom,

Not sure why it took so long to turn up but glad it is there now! Feel free to raise a support ticket if you need further help.

Cheers,

Simeon.

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 13, 2019

Hi @[deleted] 

we had a further twist in the event set up.

Rule 1 firing the event didn't trigger rule 2. I manually fired the event on the trigger issue using scriptrunner but still not picked up in logging.

I've gone back to two rules firing independently until I have time to work though it in a dev environment.

Tom

Deleted user August 13, 2019

Hey Tom,

There is an option when firing to use an older style event. Maybe experiment with turning this on and off - it may help. I think ScriptRunner may still be using the old style and not the new IssueBundle that we use.

Let me know how you go and if you're still struggling, raise a support ticket.

Cheers,

Simeon.

Jaroslaw Wojciechowski February 24, 2020

@[deleted] Its been some time since you have posted that.

Do you guys have any ETA of when we could expect possibility to simply (without any workaround) call one rule automation from another one ?

 

Thanks

Jarek

Simmo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 24, 2020

Hi @Jaroslaw Wojciechowski ,

I'm afraid that I don't have an ETA for you at the moment.

Cheers,

Simeon.

0 votes
Hallvard Müller December 22, 2019

I am struggling with the exact same thing, but on server. How is this enabled there, as  I cannot seem to find a checkbox which enables that?

Hallvard Müller December 22, 2019

Sorry, my question is for Confiforms. I just discovered this thread is for Jira.

Suggest an answer

Log in or Sign up to answer