Hi,
I am using below script (scripted field) to fetch user' group, but I am not sure how should I get project role instead of assigned group of a user (assignee of an issue).
import com.atlassian.jira.component.ComponentAccessor
def groupObjs = ComponentAccessor.getGroupManager().getGroupsForUser(issue.getAssignee())
String[] groupNames = new String[groupObjs.size()]
for (int i = 0; i<groupObjs.size(); i++)
{
groupNames[i] = groupObjs[i].name
}
return groupNames.toString()