How do I reassign to specific user?

Hi

How do I reassign a issue to a specific user?


rule Set Assignee to Appropriate User

when issue.Type.becomes({enhancement}) {
    if (Assignee == null) {
        issue.Assignee = WHAT?
    }
}
prettyPrint();

Many thanks.
4 comments
Comment actions Permalink
Hello!

To find specific user, you can use following code:
var xxx; 
for each user in {group: All Users}.getUsers() { 
  if (user.fullName == "Full Name") { 
    xxx = user; 
  }
if (Assignee == null) {
   issue.Assignee = xxx;
}

}
prettyPrint();

And of course, you can take any group which contains your user, instead of "All Users" group.
0
Comment actions Permalink
Thank You and very much appreciated.

I will test it later today and let you know how I get on.
0
Comment actions Permalink
I am having the opposite issue, tasks marked as fixed are assigned automatically to a specific user. I can't find the workflow that generates this behavior.
Please help.
0
Comment actions Permalink
Hello, Lior!

You could use workflow, like:
rule reassignToTester 
 
when issue.State.becomes({Fixed}) { 
  for each user in {group: Testers}.getUsers() { 
    if (user.fullName == "Full Name") { 
      issue.Assignee = user; 
    } 
  } 
}
prettyPrint();
But make sure, that required user is in Assignees for the project.
Is it right for you?
0

Please sign in to leave a comment.