That's possible, but you'll have to keep your country/user association right in the script.
Something like this:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.customfields.option.LazyLoadedOption
def countryUserMap = [
countryName1:user1,
countryName2:user2,
//etc
]
def categoryCf =ComponentAccessor.customFieldManager.getCustomFieldObjectsByName('Category').first()
def countryCf = ComponentAccessor.customFieldManager.getCustomFieldObjectsByName('Country').first()
def category =(issue.getCustomFieldValue(categoryCf) as LasyLoadedOption).value
def country = (issue.getCustomFieldValue(countryCf) as LasyLoadedOption).value
if(category == 'xxx){
def assignee = ComponentAccessor.userManager.getUserByName(countryUserMap[country])
issue.assignee = assignee
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter,
Thanks for solution, that really worked for me.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.