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?
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.
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!
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