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

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

0 votes
Accepted answer
Nick Menere Community Champion Oct 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

Thanks for the response @Nick Menere that work great.

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 Community Champion Aug 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

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 16, 2018 in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

1,288 views 17 10
Join discussion

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