Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
UI Text Box
sizemedium
typeinfo

This function returns the Atlassian account Id for a given user name. In case, the given text is not a valid display name of a user, an empty text is returned. In case, multiple users have the same display name, the first one is returned.

Code Block
languagebash
titleSyntax
linenumberstrue
userAccountId(userName) #Output: Text
UI Expand
titleExamples
Parser expressionDescription
Code Block
languagebash
linenumberstrue
%{userAccountId("Bob Smith")}
This example returns the Atlassian account Id of the user Bob Smith, e.g.:
557058:145e0983-5707-439c-80e4-1160dd57f142
UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
userName

Status
subtletrue
titletext

Text containing a valid user display name.
UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext


UI Text Box
sizemedium
typeinfo

Variant for multiple users. In case, one of the given texts is not a valid display name of a user, an empty text is returned. In case, multiple users have the same display name for an element of the list, the first one is returned.

Code Block
languagebash
titleSyntax
linenumberstrue
userAccountId(userList) #Output: Text list
UI Expand
titleExamples
Parser expressionDescription
Code Block
languagebash
linenumberstrue
%{userDisplayName(%{issue.watcher})}
This example returns the display names of all watchers.

To achieve this, the following functions are used:

Code Block
languagebash
linenumberstrue
%{userDisplayName(["b.smith", "d.jones"]))

This example returns the display names of the two users, e.g.:

557058:145e0983-5707-439c-80e4-1160dd57f142, 5cb4ae0e4b97ab11a18e00c7

UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
userList

Status
subtletrue
titletext list

Any valid text list containing user display names.
UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext list

UI Text Box
typetip

If you want to return the user name instead of a display name, check out: fullNameToUser()


Use cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_userdisplayname" and space = currentSpace()

Page properties
hiddentrue
id1
Parser function cloud
Map(question)
Notes

Workaround

Code Block
languagebash
issue.reporter.displayName
//and
issue.watchers.map(u=>u.displayName)

Only possible to access it using an user field, but it is not possible to access to an user with an username, only with the account ID.

Page properties
hiddentrue

Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged

Page properties
hiddentrue
Short description

Returns the full name of a given user.

Output

Status
subtletrue
titletext
 
Status
subtletrue
titletext list

Available since

Status
subtletrue
colourBlue
title3.0.1

Label