Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,462,878
Community Members
 
Community Events
176
Community Groups

How do I prevent looping in Insight Automation

For Insight Automation I am running a groovy script to update objects, how can I prevent the automation from looping? There is no functionality for suppressing facade events as far as I am aware of. Is there a way to use currentUser() in the IF of the automation if using a techUser for the "run as"?

1 answer

1 accepted

0 votes
Answer accepted

You can limit looping by adding an "Idle Interval" parameter to the Action definition in the automation screen. You can try with 30s to prevent one event to fire generating a second one right within the next 30seconds. But this doesn't always work if you perform large bulk edits, the automation queue may be so large and take a long time to flush that the 30s will be long past by the time the automation is executed.

The other option is to instruct your script not to fire any events when it updates the object.

When you call the storeObjectBean() or storeObjectAttributeBean() methods, pass the following as a second argument: com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption.DO_NOT_DISPATCH

If you use the DO_NOT_DISPATCH method, you don't need to use the Idle Interval.

Yes, tried the idle already but not optimal. Thanks for the suggestion of adding the second arg....did not think of it as was not listed in the javadocs, but worked like a charm!!

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events