User name
This function returns the Atlassian account ID for a given user display name or email address. In case the given text is not a valid display name (or email address) of a user, an empty text is returned. In case multiple users have the same display name/email address, the first one is returned.
userAccountId(userName) #Output: Text
Examples
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns the Atlassian account ID of the user Bob Smith, e.g.: 557058:145e0983-5707-439c-80e4-1160dd57f142 |
|
Bash
|
Assume, we have two users with the same name "Will Smith", the first with the Atlassian account ID "557069:145e0983-5707-439c-80e4-1160dd57f142", the second with "77cb4ae0e4b97ab11a18e99f5". Then the result would be 557069:145e0983-5707-439c-80e4-1160dd57f142, reflecting that the account ID of the first "Will Smith" is returned. |
|
Bash
|
This example returns the Atlassian account ID of the user with the email address B.Smith@mydomain.com, e.g.: 557058:145e0983-5707-439c-80e4-1160dd57f142 |
|
Bash
|
This example returns the Atlassian account ID of the first user whose name or email address includes Smith. |
Additional information
Parameters used in this function
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
text |
Text containing a valid user display name. |
Output
This function returns a text
User list
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.
userAccountId(userList) #Output: Text
Examples
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns the Atlassian account ID of all users which are stored in the given custom text field (e.g. "John Doe, Mary Jones, Bob Smith"). To achieve this, the following functions are used: |
|
Bash
|
This example returns the Atlassian account ID of the given two users, e.g.: 557058:145e0983-5707-439c-80e4-1160dd57f142, 5cb4ae0e4b97ab11a18e00c7 |
|
Bash
|
Assume, we have two users with the same name "Will Smith", the first with the Atlassian account ID "557069:145e0983-5707-439c-80e4-1160dd57f142", the second with "77cb4ae0e4b97ab11a18e99f5". Dolly Jones has the account ID "5cb4ae0e4b97ab11a18e00c7". Then the result would be 557069:145e0983-5707-439c-80e4-1160dd57f142, 5cb4ae0e4b97ab11a18e00c7, reflecting that the account ID of the first "Will Smith" is returned. |
Additional information
Parameters used in this function
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
text |
Any valid text list containing user display names. |
Output
This function returns a text
(books) Use cases and examples
| Use case | JWT feature | Workflow function | Field type | Automated action | Parser functions |
|---|---|---|---|---|---|
| Send an email to the project lead for a system managed in Jira Service Management Assets |
|