Hi.
I need to make a dependence on create screen.
If a custom field (select type) is a specific choice, another field (text type) should become required.
I try this code on behaviours without success (only after the creation the field becomes required):
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours fieldBehaviours
def regressionIssueField = getFieldById(getFieldChanged())
def targetField = getFieldByName("Environment/ Platform")
def selectCFValue = getFieldByName("Patch Type").getValue();
if (selectCFValue == "GA Point Patch" || selectCFValue == "GA Cumulative Patch") {
targetField.setRequired(true)
} else {
targetField.setRequired(false)
}
It is a little bit urgent :) Thank you very much!
Daniel