It's a validator that enables you to validate transitions by running your own Groovy Script.
You can use this validator to program your own custom logic if no predefined conditions suit your needs.
Element summary
Status
CURRENT
Version compatibility
6.0.1 - Latest
Supported
Yes
Introduced in version
2.0.0
Condition parameters
You can choose between two methods of inputting your scripts.
Script template
Inline script
Script template - allows you to select a script from a drop-down list containing your collection of Reusable Validator Scripts.
Inline script - displays a field that allows you to input a new script from scratch. (Useful when you need to quickly add simple scripts you won't be using in other places.)
Validation
Validated transition is executed or cancelled based on logic contained in your Groovy Script.
In order to cancel a transition, validator needs to throw an exception. Otherwise, transition will be executed.
Even if Validator Script doesn't throw an exception, it's logic will still be executed. You can use this to perform various operations on transition stage.
Throwing an exception:
JIRA Transition Validators use InvalidInputException class to throw exception when transition needs to be cancelled. You need to import said class first in order for your script to work properly. This can be done by inserting the following line into your script: