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

This widget could not be displayed.
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 Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

463 views 3 17
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