You can try:
import com.atlassian.jira.ComponentManager import com.atlassian.jira.issue.CustomFieldManager import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.MutableIssue import com.atlassian.jira.issue.comments.CommentManager import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.util.ImportUtils import com.atlassian.jira.user.util.UserManager import com.atlassian.crowd.embedded.api.User // added line no.1 import com.atlassian.jira.component.ComponentAccessor // added line no.2 userManager = (UserManager) ComponentAccessor.getUserManager() MutableIssue issue = issue User usera = userManager.getUser('my_user_name'); issue.setAssignee(usera);
Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG