good day.
on the transition I have a screen with a custom single user picker "approver". in post-functions I display this user's name in a comment with some text. when this comment is displayed, the user "approver' is written as userkey like jsmith (not the full name).
how can Groovy be used for converting a userkey to a full user name?
and can it be changed within this custom field, without using additional cf?
com.atlassian.jira.user.util.UserManager#getUserByKey
The getUserByKey method will return an ApplicationUser object. You can use that object's getDisplayName() method (or the Groovified .displayName property) to get their name.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to ask the authors of whatever plugin that comes from - not sure why you have used SR tags instead of theirs. Easy to do with SR though.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
image2016-7-11 13:43:46.png
here it is a configuration, %{11021} is user picker cf, and it doesnt have a "cf Full name" property as the built-in user pickers have (reporter's full name, assignee's full name)
approver cf is on Screen, agent inserts value manually:
image2016-7-11 13:48:16.png
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you add a screenshot of the Add a Comment config? I'm not familiar with that... also not sure how you got the approver in there?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie,
I'm adding a comment with a standart post-function "Add a comment", not from a script. It is inserted as a string. As i understand there are no variants to format this value within this comment post-f, so I want to convert this name in a separate script or by more logical method, if it exists
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you explain how it's appearing in the comment? Is the object you have a String (the user key), or an ApplicationUser object?
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.