Advanced Field Validation for JIRA Transitions

mburke December 19, 2019

I'd like to setup a validator to prevent a transition from happening in our workflow if certain criteria aren't met. I know this can be achieved through validators/conditions in the transitions. But the criteria I want is a bit more complicated and would involve and/or logic.

For example, I only want to allow a ticket to be transitioned to Code Review status if the Peer Reviewers field is not empty, or if the Skip Peer Review checkbox is not empty. If either of the criteria are met I would like the transition to be allowed. I know I can set up a validator for each one of those fields, but that means that I would need both fields to be not empty, which isn't what I want. What I really want is the or logic so that if either one of those fields is set then the transition is allowed. Is there a way to do more complex validation like this?

1 answer

1 accepted

2 votes
Answer accepted
Gustav L_Estrade
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 19, 2019

Hello @mburke 

I see two possible solutions to your problem. The first would be to have a look at the setting for the condition. At the top left corner of the condition view, you can choose wether or not to require all the conditions or any of them. This could solve the need you have. image.png

Another thing you can have a look at is Jira Misc Workflow Extensions, which is a plugin that give you more to work with. This includes the possibility to script the conditions with Groovy code. See this link: https://marketplace.atlassian.com/apps/292/jira-misc-workflow-extensions-jmwe?hosting=cloud&tab=overview

Hope this helps!

Good luck with your Jira endeavors!

Suggest an answer

Log in or Sign up to answer