Hi Team,
I want few fields required upon closing of ticket via scriptrunner or JSU, as this 2 add-ons we have.
So When some one click Close request and if Field A = ABC then it should check if field X & Y is not empty. Trying on various ways but couldnt succeed.
Trying Field Required Validator (Scriptrunner) but no luck, behavior will not fit as I need this on workflow transition. This is what I am using on behavior side but thats also not working.
Please help here for this one to make it work on workflow transition and what should I use.
import com.atlassian.jira.issue.fields.CustomField
import com.onresolve.jira.groovy.user.FormField
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.component.ComponentAccessor
def FieldA = getFieldById("customfield_15600")
FormField TrAMSFunctionalArea = getFieldById("customfield_15702")
String FieldA = (String) FieldA.getValue()
if (FieldA.equals("ABC") {
FieldX.setRequired(true)
FieldY.setRequired(true)
}
else {
FieldX.setRequired(false)
FieldY.setRequired(False)
}