You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Join now to unlock these features and more
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:
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!
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."
I'm trying to use this validator for adding Fibonacci series to Story Points field. But its somehow not working as per the expectation. As per Fibonacci series, I've added the regular expressions as 0, 1, 2, 3, 5, 8. But my workflow if being transitioned to next status even if I add some other values like 12, 21, 13 etc.
Can you please help me how can I achieve this?
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?
Best, Joseph Chung Yin
Jira/JSM Functional Lead, Global Infrastructure Applications Team