Hi Team,
we have Cust name Multi - 80 values and MAID Multi 80 values if any of the Cust name Multi is selected MAID Multi should populate the multiple values how to achieve this please
I was able to achieve for two values using scriptrunner not more than that. As i am new to scripting someone help me
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours fieldBehaviours
def clientName = getFieldById(getFieldChanged())
def maidID = getFieldByName("MAID Multi")
def clientNameVal = clientName.getValue().toString()
// Getting select field optionsdef selectCustomField = customFieldManager.customFieldObjects.findByName("MAID Multi")
def selectConfig = selectCustomField.getRelevantConfig(issueContext)
def selectOptions = ComponentAccessor.optionsManager.getOptions(selectConfig)
if(clientNameVal == "[aarkishpharma]"){
maidID.setFormValue(selectOptions.findAll{it.value in ['900702']}*.optionId)
}else if(clientNameVal == "[acellapharma]"){
maidID.setFormValue(selectOptions.findAll{it.value in ['900025']}*.optionId)
}else if(clientNameVal == "[aarkishpharma, acellapharma]"){
maidID.setFormValue(selectOptions.findAll{it.value in ['900702','900025']}*.optionId)
}