Hello,
I'm looking for a little help with scriptrunner and post functions. So far the assigning the user is not an issue as assigning as current user is a pretty easy post script. Where I am running into a problem is assigning the Custom Field "Assigned Team". I found a script but that references our internal directories but I'd like to translate that into some action. Any and all help is appreciated.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.CustomFieldManager
def userUtil = ComponentAccessor.getUserUtil()
def cf = customFieldManager.getCustomFieldObject("customfield_14202") //AssignedTeam
def assignedTeam = issue.getCustomFieldValue(cf).toString()
if(userUtil.getGroupNamesForUser(currentUser.name).contains("DEPT - CORP - Service Desk - Managers") && assignedTeam == "Service Desk")
return true
if(userUtil.getGroupNamesForUser(currentUser.name).contains("DEPT - CORP - Service Desk - Supervisors") && assignedTeam == "Service Desk")
return true