Hi,
I want to fetch what was the first group assignee on the issue. Group assignee is populated in a single group picker custom field.
For this this code was executed but couldn't get the desired result.
What could be missing in this groovy script? Could you help over this?
The script is as below
import com.atlassian.jira.issue.*
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.core.util.DateUtils
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.history.ChangeItemBean
def changeHistoryManager = ComponentAccessor.getChangeHistoryManager()
def firstAssignee=changeHistoryManager.getChangeItemsForField(issue, "Group Assignee")
log.warn "firstAssignee = "+firstAssignee
//def firstNotNullAssignee = firstAssignee[0]?.from ?: firstAssignee[0]?.to
return firstAssignee
//issue.setAssigneeId(firstAssignee)
//def ApplicationUser = ComponentAccessor.getGroupManager().getGroup(firstNotNullAssignee.toString())
//return firstNotNullAssignee
//def usertest = ComponentAccessor.getGroupManager().getGroup()
