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

1 vote
Accepted answer
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
Community showcase
Published Oct 31, 2018 in Marketplace Apps

Marketplace Spotlight: Zephyr

Hello Atlassian Community! Each month, we run a series of Spotlights to highlight Marketplace vendors and apps that our team thinks this Community would find valuable. In last month's Spotlig...

330 views 0 1
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