userDisplayName()

Account Id

This function returns the display name for a given Atlassian account ID. In case the given text is not a valid Atlassian account ID, an empty text is returned.

Bash
userDisplayName(accountId) #Output: Text

Examples

Parser expression

Description

Bash
%{userDisplayName(%{system.currentUser})}

This example returns the display name of the current user, e.g.:

Bob Smith

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

accountId

text

Text containing a valid Atlassian account ID.

Output

This function returns a text


Account Id list

Variant for multiple users.

Bash
userDisplayName(accountIdList) #Output: Text list

Examples

Parser expression

Description

Bash
%{userDisplayName(toStringList(%{issue.watcher}))}

This example returns the display names of all watchers.

To achieve this, the following function is used:

Bash
%{userDisplayName(["557058:145e0983-5707-439c-80e4-1160dd57f142", %{issue.reporter}])}

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

Bob Smith, Mary Jones

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

accountIdList

text list

Any valid text list Atlassian account IDs.

Output

This function returns a text

If you want to return the Atlassian account ID instead of a display name, check out: userAccountId()


(books) Use cases and examples