Hi,
I have the following code:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.ApplicationUser
def CommentManager = ComponentAccessor.getCommentManager()
if (CommentManager.getLastComment(issue)) {
def lastCommentAuthor = CommentManager.getLastComment(issue)?.getAuthorApplicationUser()
return lastCommentAuthor
}
it worked in previous Jira version and in jira 8 it is returning Anonymous
When I change template to Text Field it return correct username.
Hi Lukasz,
Check the searcher for this field. Make sure it's set to 'User Picker & Group Searcher'. This should fix your issue.
Hi Ivan,
Thanks for reply.
Please take a look at attached screenshot,
and the result when runned with text field
To be honest I don't know what do you mean by "searcher for this field"
Best Regards,
Łukasz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok,
Since you are returning an ApplicationUser in your script, you should set your field template to 'User Picker (single user)', exactly like you did in your first screenshot.
After you do that, you need to set the correct searcher (search template) for your field.
Go to Admin > Issues > Custom Fields, find your field there and then click on the 'gear' icon to the right. In the opened menu click on "Edit". In the next screen select "User Picker searcher" in the "Search Template" field.
More info on configuring your custom fields can be found in this documentation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.