Hi All
I recently needed to determine the value of a cascade field to automatically assign handlers, which I learned could be done through Scriptrunner, but I found that the script I wrote was not successful,The specific code is as follows
import com.atlassian.jira.component.ComponentAccessor
def customFieldManager = ComponentAccessor.customFieldManager
def Platform_field = customFieldManager.getCustomFieldObject('customfield_13768')
def Platform = issue.getCustomFieldValue(Platform_field).toString()
def mail = ''
if (Platform == 'test'){
mail = 'arno@test.com'
}else if (Platform == 'test1'){
mail = 'addy@test.com'
}
def user = ComponentAccessor.userManager.getUserByName(mail)
issue.setAssignee(user)
I know that the cascading field belongs to the map type, is there a problem with my conversion method? If I get the field of the selection list (single selection), the above code can work normally