Hi,
I want a field in Transition screen to be marked as Mandatory based on the value in Issue create screen. I have implemented this using Behavior add on the Create screen but the same is not working on the Transition screen.
Say choosing 'No' to a custom select field 'Are You using Rally' in create Issue screen need to make a field in Transition screen as mandatory. Kindly note i'm not going to display 'Are You using Rally' again in Transition screen for this purpose.
I have this code working without any issues in create issue screen. I have place this code under validator section of the Transition screen as Script validator. Any idea why it is not working in Transition screen.
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours fieldBehaviours
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def optionsManager = ComponentAccessor.getOptionsManager()
def compReviewSelectCf = getFieldById("customfield_18620") // parent filed
def vpCompJustSelectCf = getFieldById("customfield_18805") //child field.
if (compReviewSelectCf.getValue() == "Compliance Approval Not Needed"){
vpCompJustSelectCf.setRequired(true);
}