Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Check if a field is set to a specific value upon transition (validator)


Does anyone know if it is possible to check the value of a field upon issue transition and stop the issue from transitioning if the field is not a specific value? Example:

Single select drop down list called Color with these values:

- Red

- Blue 

- Green

Upon transitioning the ticket from Open to In Approval status, check to make sure the value for Color is not "Red".  If the value is "Red" show an error message that says "Color field cannot be set to red when transitioning to 'in approval'." or something like that.  Hope that wasn't too confusing! 

2 answers

This is exactly what Validators and Conditions are for. If you want to prevent the user from SEEING (and being able to use) the transition, you want to use a Condition. If you want to throw an error when they try to transition, you want to use a Validator. It sounds like you want to use a validator in this case.

You'd want the Regular Expression Check validator. Select your Color field and use this as the regex: ^(?!.*Red).*

I think that will match anything that's not "Red". 

Unfortunately, the Regex validator doesn't let you provide a custom error message like some of the other vadators do (which is odd). If you're set on being able to provide the custom message you could always set up yet another field and some automation. It would look something like this:

Field: ColorIsRed (single-line text box)

Automation: when Color changes, if Color is not Red, set ColorIsRed to No, otherwise, clear ColorIsRed.

Validator -  Now you can use the Field Required Validator on the ColorIsRed field. If it's not populated, you can throw an error stating that "Color can not be red."

0 votes

@Bella Lopez -

Hi there:

In my opinion, it should be implemented as a "Condition" and not "Validator".  When using condition setup, one will not be able to see the transition if the condition testing is true.

So, user will not be able to see "In approval" transition button to move issues from "Open" status if Color field is already set to RED.  I believe this what you want to achieve right?

Please advise.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Service Management

JSM Jira Automation: How to Send SLA Breached Notifications

Hi Everyone, In   this tutorial,  we will show you how you can monitor an SLA, and send notifications before or after the SLA has been breached.   SLA Threshold Trigger The SLA t...

764 views 5 13
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you