Hey guys,
Is there a way to get the username of an application User that was mentioned on a ticket.
def HowCanI = com.atlassian.jira.event.listeners.mention.MentionEventListener.getUsername()
Or this there a way to search via full name to get a user
userManager.getUserByName("Thomas Smith") -> The username is tsmith
Hi Thomas, if you have access to the comment data. Usually, the username is already there and it is currently formatted as [~username]
All you need to do is parse that to whatever you like.
Hey Bryan,
this is what I ended up doing, just filtered out the [~] and I had the username
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you are mistaking listener with the event. MentionIssueCommentEvent has getToUsers() method which will return you set of ApplicationUsers:
as for your second question, there's
UserSearchService.findUsersByFullName(String fullName)
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.