Jira Data Center Version 8.20.1
Script runner 6.46.0
I am using the behavior option in script runner to require/show a text field based on a value in a list field. Using debug logging it works but never gets into the if statement. I set the behavior on Affected Artifacts field as that is the list I am getting the value.
Below is my code
def.af = getFieldByName("Affected Artifacts")
def afo = getFieldByName("Afftected Artifacts (Other) ")
afo.setHidden(true)
if (afVal == "Other) {
afo.setHidden(False)
afo.setRequired(true)
{