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

andreas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 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

1 vote
Answer accepted
andreas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 1, 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

Kevin Cheng October 26, 2018

My case is a bit more involved and wondering if anyone has a solution.

 

In FixVersions field, user can enter one or more values at different time of the JIRA ticket.

What I want is to trigger the automation to create a subtask which I only extract the added FixVersion in the parent ticket and use that for the title and FixVersion in the subtask itself.

 

I am only able to extract the entire list of value and it is being used for the title, but I do want separate subtask for each FixVersion.

Like Мочалов Илья likes this
Joe_Hardin April 4, 2020

Kevin I have the same need. Did you ever figure out a solution?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events