Hi,
I want the comment added during the transition to be required or not depending on the option selected. I wrote the validator, unfortunately it does not work and does not require the user to add a comment.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours fieldBehaviours
def commentField = getFieldById("comment")
def cfManager = ComponentAccessor.getCustomFieldManager();
def cf = cfManager.getCustomFieldObjectByName("Options");
switch(issue.getCustomFieldValue(cf) as String){
case "No": commentField.setRequired(true)
}