Groovy script validator

 

Since version 1.1

This validator allows you to validate the issue using a Groovy script.

 

To add 'Groovy Script validator' to a transition: 

  1. Click Edit for the workflow that has the transition you wish to add the condition on.

  2. In the Workflow Designer, select the transition.

  3. Click on Validator in the properties panel.

  4. Click on Add validator.

  5. Select Groovy Script validator from the list of conditions.

  6. Click on Add to add the condition on the transition.

  7. Fill the form shown below and press 'Add' button.

Validator name –  Name of the validator. It will be used in the validators tab.

Script – Use this edftor to write the script.

Error message – The error that will be used if no error message is returned by the validator.

Specs

  • Script validator accepts groovy scripts. Return true to indicate a successful validation or false otherwise. Return any String to make the validation fail and use that string as the validation error message.

  • You can user ComponentAccessor to access Managers and other useful classes.

  • You can user issue to access the current Issue in validation.

  • You can try your script against any issue using the test button.