How do I check if a specific field's value has changed with Automation for JIRA?

Andreas Knecht Community Champion Sep 20, 2016

Lets assume I have a "Reviewers" custom field and I only want my automation rule to run, if the the issue was edited and this field was set to a user (i.e. not empty).  Can this be done with Automation for JIRA?

1 answer

1 accepted

0 vote
Andreas Knecht Community Champion Sep 20, 2016

Yes this can be achieved with the compare condition (here's our full list of components for reference) and smart-values!  Luckily the {{changelog}} smart-value contains a list of all fields that were changed during an edit.

We can access our "Reviewers" custom field change value using:

{{#changelog.Reviewers}}{{toString}}{{/changelog.Reviewers}}

 

Putting this all together we can come up with this rule:

Project automation - Code Barrel JIRA 2016-09-21 10-45-42.png

So we have a rule that's triggered whenever an issue is edited.  However the rule will only run if the compare condition detects a a value in the changelog for the "Reviewers" field.  If any other fields are edited, the rule will simply not run any actions!

Andreas Knecht Community Champion Dec 01, 2016

There's now an even simpler way using the new "Field value changed" trigger: https://blog.codebarrel.io/automatically-update-issues-when-a-jira-issue-field-value-changes-d932f3ea6f0f

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 Jul 10, 2018 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...

158 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