Hi All,
I have this requirement to auto assign issue to the reporter based on a Specific word (say "ABC") in the summary. I couldn't find any good way to to that in the community.
Can somebody help me with a script or a link to a possible solution?
Thanks in advance.
If this is a Jira Service Desk project, you could do this using Automation.
But if this is not a service Desk specific project, Jira does not have a native way to do this. But you could use a 3rd party plugin to allow for more extensive configuration abilities. For example, the Automation for Jira plugin could help with this same kind of functionality that exists in the service desk projects.
There are probably other plugins that can also do this like Scriptrunner, or Power scripts, but these would require you to create a custom script for those plugins to be able to handle this.
Hi @Andy Heinzer,
Thanks for the answer.
Yeah I am using script runner and I come up with this script. But it doesn't do the job and sitting there without throwing me an error. Can you please point me the problem 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);
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry @Aravindi Amarasinghe
I am not well versed in the syntax of using scriptrunner scripts. However I have tagged this thread with the Adaptavist and scriptrunner tags, so now this thread can appear inside those collections of community. Perhaps this way an expert in regards to this kind of scripting might be better able to offer insights here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the help. Hope they will help me with the script. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you find the problem and the solution of the script?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.