Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
JComment com = getLastComment(key);
assignee = com.author;


Note

Because of the option to run scripts as a default account this script looks a little different.

Instead of just grabbing the username of the person who triggered the comment rule, like this:

Code Block
assignee = currentUser();

The above example gets the username from the last comment added to the issue. This is done because the currentUser() routine will always return the name of the default user that has been configured to run the automation rule (assuming that is the way the rule has been configured). If the rule was not configured to use a default user then the currentUser() method would work.