This simple example requires the user to enter at least onefix versionif the resolution isFixed. 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 (issue.resolution.name == "Fixed" && !issue.fixVersions) {
throw new InvalidInputException("fixVersions",
"Fix Version/s is required when specifying Resolution of 'Fixed'")
}