Workflow Validators

Workflow Validators are functions executed on issue state transitions and perform validations on the issue. If validation fails workflow transition is not allowed. You can find more information on Workflow Validators on JIRA's own user manual.



You may have issues created before the plugin installed which have invalid versions. Or you may have a workflow screen on which there is no component field. To handle these cases plugin provides a workflow validator, this validator can validate correctness of the version on the issue. If the version specified is not valid for the component selected the workflow validator will not allow workflow transition will not be performed. 

Validator may be used to validate either "Affects Version" or "Fix Version" fields or both. To validate both you need to add validator twice and select corresponding version field each time.

When adding the validator for "Fix Versions" field option to disallow released versions. In ideal situation fix version should be a version which is not already released. You fix issues and assign fix version to them, or you schedule issues to feature releases using fix version. In these cases it is logical that fix version is not a released version. Note that version validity check for the selected component is done whether you click this checkbox or not.

Similarly the validator for the "Affects Versions" field as shown below allows you to disallow unreleased versions. For most of the time this is the wanted behavior. Users should not be able to report bugs for a version which is not released. Note that version validity check for the selected component is done whether you click this checkbox or not.

There are two modes for this validator. In both modes it ensures selected versions are valid for selected components. Note that add-on setting “Which versions are valid when multiple component is selected” setting also affects which versions are considered valid.

 

In the following screenshot the validator is added twice for each version field. 

If a user tries to execute a workflow transition on an issue with invalid version he will receive an error and will not be able to execute transition.