I have a set of automation rules:
1) that need to run in a priority sequence. That is, a given ticket could match on a number of rules so the most important one should go first. How to do this?
2) once a rule has been matched, how to abort further rules from processing?
Hey @Rick.Piovesan and welcome to the community,
Unfortunately there is sequence possible in the execution of Automation rules.
When the rules all match they will all fire at the same time (or in a random order which you cannot control).
The only way to create what you want would be to create a single rule and within the rule define the multiple scenario's. I dont know your use case of course but it will be the only way to give some kind of control to what is executed and when.
Within a single rule, it will run top-down and you can build this up with conditions.
Wow this is unexpectedly crude - a rules engine with no way of threading, prioritizing or aborting (and this is the 'new' rules engine !?!)
I will go with your idea of "One rule to Contain them all" (where have I heard that before..). But its going to be a huge, messy, complex and probably indecypherable mess once I finally get it working.
Big, big, big disappointment in Atlassian ..
Well you'll have to write out your rule/rules and see if there maybe it a way they can trigger each other if needed.
That could also be a way of linking them together and sequencing them.
I understand that it would be great to have multiple rules with the same trigger and have them run as dependencies of each other.. but nope..
Having multiple massive If's tho will be your best bet for now.. We'll see if they improve it in the future!
to your first para - how could a rule trigger another rule? If 'A' needs to somehow trigger 'B' but no way to make sure that 'B' doesn't run before 'A' ?
i don't care/want dependencies, just enough to be sure that 'A' runs before 'B' (prioritizing) would be sufficient for now - something that is really basic to any rules processing.
With this alone we can work around all other painful limitations - i.e., "stop processing any more" could be a flag that is checked in each subsequent rule ..
Well just from the top of my head you could
basically you create your own order custom field.
Well yes and no,
out of the box there is no mechanism to do this. But you can use the blocks that are available to create this yourself.
If you first create rule 1 which triggers on the normal trigger that you want, in the execution of that rule you add a step (preferably at the end) that sets a custom field to a specific value.
Your 2nd rule then would have a trigger of "issue updated" which check on the value on that field. If it matches you execute rule 2.
For rule 3 you can do the same, you can use the same custom field but with a different value. (which you would have set then in your 2nd rule)
Is it ideal and elegant, not really. Will it work, most likely yes.
You would create your sequence by working with specific triggers (issue updated) with a custom field and a value. Could be as easy as setting the field to 1, 2 or 3..
Hello Community! We’re excited to announce that Mindville Insight’s asset and configuration management capabilities will now be integrated into Jira Service Management Premium and Enterprise plan...
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