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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

284 views 0 6
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