Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

rules - How to sequence, how to terminate

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?
RickP.

1 answer

1 accepted

0 votes
Answer accepted
Dirk Ronsmans Community Leader Mar 22, 2021

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 ..

Rick.

Dirk Ronsmans Community Leader Mar 22, 2021

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 ..

Dirk Ronsmans Community Leader Mar 22, 2021

Well just from the top of my head you could

  • add a custom field (text would be fine)
  • As the ‘last’ step in your first rule set this field to some value
  • make your subsequent rule trigger on that customfield change and add an if to check the value. 

basically you create your own order custom field. 

Ok - are you saying that rules can be made to run in a specific sequence order?

If so, how is that order set?  (can't be the UI's displayed order because the display grid is sortable).

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..

Got it .. yep a kinda 'Rube Goldberg' approach to enterprise software architecture but should work - I'll try it out now. Thx, Rick.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
Community showcase
Published in Jira Service Management

Announcing Mindville Insight is now part of Jira Service Management!

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...

734 views 12 15
Read article

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