Custom script field with "User Picker (single user)" template always shows "Anonymous"
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.user.ApplicationUser def CommentManager = ComponentAccessor.getCommentManager() if (CommentManager.getLastComment(issue)) { def lastCommentAuthor = (ApplicationUser) CommentManager.getLastComment(issue).getAuthorApplicationUser() return lastCommentAuthor }
If I check class of "lastCommentAuthor" via .getClass()
, I'll get class com.atlassian.jira.user.DelegatingApplicationUser
which looks correct, but for some reason ScriptRunner can't make a user from this data.
Moreover, even example code returns Anonymous.
What's wrong?
JIRA 6.4.9, ScriptRunner 4.1.3.23
Community moderators have prevented the ability to post new answers.
Hi Yevgen,
Can you double check that your scripted field Searcher is User Picker Searcher ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.