import com.atlassian.jira.event.issue.IssueEvent;
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.issue.MutableIssue;
import com.atlassian.jira.user.ApplicationUser;
import com.atlassian.jira.event.type.EventDispatchOption;
Issue issue = event.getIssue();
MutableIssue mutableIssue = null;
mutableIssue = issue;
ApplicationUser user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser();
if(issue.getIssueType().getName().equalsIgnoreCase("Legal"))
{
mutableIssue.setAssignee(user);
ComponentAccessor.getIssueManager().updateIssue(user, mutableIssue, EventDispatchOption.DO_NOT_DISPATCH, false);
}
The above one is my script to set the assignee when an issue is moved from one issuetype to another issuetype,the assignee should be of issuetype to which an issue is moved.
I am getting an error like "cannot an assign value of type com.atlassian.jira.issue.Issue to variable of type to com.atlassian.jira.issue.MutableIssue"