It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Cascading rules?

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

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]

Cloud. Oh well. :)

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]

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.

Hi @Simeon Ross,

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

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]

@Simeon Ross  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.

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

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 Simeon Ross likes this
tom_lister Community Leader Jul 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

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 Jul 31, 2019

Hi @Simeon Ross 

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

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 Aug 13, 2019

Hi @Simeon Ross 

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

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.

@Simeon Ross 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

Simeon_Ross Atlassian Team Feb 24, 2020

Hi @Jaroslaw_Wojciechowski ,

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

Cheers,

Simeon.

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?

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

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you