How can I ensure an Automation rule only runs once for an issue?

Andreas Knecht Community Champion Oct 10, 2017

I want to ensure we only run a particular rule one time against an issue. How can you do this with Automation for Jira?

1 answer

1 accepted

0 vote
Andreas Knecht Community Champion Oct 10, 2017

So there's a few different ways this can be done. A visible way would be to edit the issue and add a label, then check for the presence of this label with a JQL condition.

Another way that's invisible to users is to use entity properties. Your rule would look like this:

  • Trigger: Any trigger
  • Compare condition:
    • First value: {{issue.properties.ruleexecuted}}
    • Equals:
    • Empty (leave field blank
  • Action: Do something like editing the issue
  • Action: Set entity property 'ruleexecuted' = true

 

It looks like this in practice:

run-once.png

 

The actions in this rule will now only execute once for a given issue.  After that, the compare condition will fail since the issue property has a value.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Tuesday in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

116 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you