Can i validate previous status to execute rule when issue is transitioned?

Sebastián Delmastro October 18, 2017

I have a workflow than can go into statues like this:

A --> B

B --> C

A --> C

 

I only want to execute an automation rule when the issue is transitioned to C but only from B status. So I need to check to things in order to execute the rule:

(1) The issue transitioned to C

(2) The issue was transitioned from B

Thanks for the help!

1 answer

1 accepted

1 vote
Answer accepted
Nick Menere
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.
October 18, 2017

Hi Sebastián,

To do this you can create a rule with the following:

  • Add a "Field value changed" trigger and listen for changes to the Status field
  • And a Compare condition to check for the previous value and current value.

It should look like this:

Screen Shot 2017-10-19 at 3.24.18 pm.png

The value for the First field is:

{{fieldChange.fromString}} -> {{fieldChange.toString}}

Hope that is what you were after.

Cheers,

Nick

Sebastián Delmastro October 27, 2017

Thanks for the response @Nick Menere that work great.

Deleted user August 22, 2018

I'm going from "In QA" to "In Progress" and I tried those statuses with and without quotes (single and double) in the "Second Value" filed but neither seems to match against the values described in the first field. Is there a special way this needs to be formatted when there are spaces in the status names?

EDIT:

Apparently, it matters what trigger is chosen. To use this solution, make sure you are using the "Field value changed" trigger.

Nick Menere
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.
August 22, 2018

Hi Daniel,

Yes, for that syntax you need to use that trigger. It is what populates "fieldChange".

 

If you want to use another trigger you will need use:

 

{{changelog.status.fromString}} -> {{changelog.status.toString}}

Cheers,

Nick

Jim Sola January 18, 2021

As this comment is out of date (like seemingly most support threads here on Jira), note that the webhook has changed..

from:

{{changelog.status.fromString}} -> {{changelog.status.toString}}

to:

{{changelog.items.fromString}} -> {{changelog.items.toString}}

 Jira, get it together.

Anton April 20, 2021


Hi,

I have the same problem as described by Sebastián. As stated by Jim I used the new webhook. Unfortunately I can’t get the advanced compare to work. Below you find a screenshot of what I have so far.
It is in Dutch but I hope anyone can point me in the right direction.

Thanks in advance.
Anton.

Advanced Compare.PNG

Anton April 30, 2021

Hi,

I read on this page that {{changelog}} will not be populated if you use the wrong trigger.
So that basically answered my question.

Suggest an answer

Log in or Sign up to answer