Require Fix Version if resolution is Fixed

This simple example requires the user to enter at least one fix version if the resolution is Fixed. Although this can be done in multiple other ways, eg with the Behaviours plugin, this is the most straightforward way.

import com.opensymphony.workflow.InvalidInputException

if ( == "Fixed" && ! issue.fixVersions) {
    throw new InvalidInputException("fixVersions",
        "Fix Version/s is required when specifying Resolution of 'Fixed'")
It is easier to use a Simple Scripted Validator to do this.

For how-to questions please ask on Atlassian Answers where there is a very active community. Adaptavist staff are also likely to respond there.

Ask a question about ScriptRunner for JIRA, for for Bitbucket Server, or for Confluence.