Full name for user picker custom field
Hi Fidel,
we are using the Send an email post function and wonder if it would be possible to resolve the full names of users selected in a multi or single select user picker custom field like for the system user fields (e.g. assignee, reporter)?
Kind Regards,
Christian
Comments (9)
-
repo owner -
reporter This works almost perfect - Thank you!
One further question regarding the output of the Multi-User Picker. When we have multiple persons selected - e.g. Tom Miller and Mike Thompson the output would be: Output: Miller, Tom, Thompson, Mike
Would it be possible to tweak this to use another separator (e.g. ";" or "/")? Fancy would be if it we can put the result in a bullig list...
-
reporter And one other thing came up as well, but this might be a new issue if you like: Is it possible to render wiki text from the issues description in the body of the mail sent by the Send an email post-function?
-
repo owner Do you want to create an html list using <ul> <li> tags?
Converting wiki to html might be possible, but very difficult to implement using text format functions. I will study the feasibility of adding a special format function to do it.
-
reporter yes - <ul> <li> would be great!
Thank you for investigating the wiki to html rendering!
-
repo owner In order to get a <ul><li> html list from a Multi-User Picker custom field, use "Copy a parsed text to a field" post-function in advanced parsing mode with the following text expression:
"<ul>" + replaceAll(toString(textOnStringList(toStringList(%{nnnnn}), "<li>" + userFullName(^%) + "</li>")), ">,", ">") + "</ul>"
replacing nnnnn with field code for the Multi-User Picker field.
-
repo owner - changed status to resolved
I close the issue. Please, reopen it if solution provided doesn't meet your needs.
-
Hi Fidel, I have the same need as Christain's question above and it doens't seem to work. So I use MutilUser field and I want to display the name of the user as the HTML body of the email.
In HTML body, I try: toString(textOnStringList(toStringList(%{11903}), userFullName(^%))) I also try: "%{11903}, and it gives out user's logon ID: cn10291, gd12312 I'm looking for user display name, like: Chris Nor, Gary Dan.
-
Nevermind, I combine this with another thread that you post and I have it working. https://bitbucket.org/fcarmario/jira-workflow-toolbox/issues/306/use-users-full-name-in-e-mail-body
Thx
- Log in to comment
Hi Christian,
Yes, it can be done by previously using "Copy a parsed text to a field" post-function in order to store into an ephemeral string field the full names of the desired User Picker or Multi-User Picker custom field. Then you will be able to use the ephemeral string field in "Send an email" post-function.
This is an example:
Text to be parsed is:
replacing nnnnn with field code for User Picker or Multi-User Picker custom field.
If you are using personalized sending mode in "Send an email" post-function, you should use "Ephemeral string 1" or Ephemeral string 2", since the rest of ephemeral string fields are overwritten.