Hi All,
I have a requirement to assign issue to a user based on a specific text in the summary field.
I come up with this script but it doesn't do the job. Can somebody help me to find the error in this script?
import com.atlassian.jira.issue.*;
import com.atlassian.jira.issue.MutableIssue;
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.ComponentManager;
MutableIssue myIssue = issue;
String summary = issue.getSummary();
String[] result = myIssue.summary.toString();
if (result!=null && result.length>3)
{
//Capture the word in summary
if (myIssue.summary.toString().matches("#RACF#"))
{
//Assign issue to the user
def user = userManager.getUserObject("au.aaa@bbb.com");
if (user) myIssue.setAssignee(user);
}
}