I am trying to selectively reassign an issue based on the original reporter of the issue once the issue has been resolved. However, I'm missing something, obviously, because this simple script is not working--
if (issue.get("reporter").getUsername() == 'admin') {
issue.setAssignee('user_id')
} else {
issue.setAssignee(issue.get("reporter").getUsername())
}
We are using the option Set field value (JMWE add-on) and then choosing a value type of Groovy Expression.
Thanks in advance.