userProperty()

This function returns the value of a user property for a given user.

If the user doesn't have the property set, en empty text ("") will be returned.


Bash
userProperty(propertyName, userName) #Output: Text


Examples

Parser expression

Description

Bash
userProperty("department", "b.smith")

This example returns the value for the user property department for the user b.smith, e.g.:

HR

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

propertyName

text

Text containing a valid user property.

userName

text

Text containing a valid user name.

Output

This function returns a text


Variant for multiple users.


Bash
userProperty(propertyName, userNames) #Output: Text list


Examples

Parser expression

Description

Bash
userProperty("department", %{issue.watcher})

This example returns the value for the user property department for all watchers of the current issue, e.g.:

HR, Finance, Dev

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

propertyName

text

Text containing a valid user property.

userNames

text list

Comma-separated list of user names. 

Output

This function returns a text list


📚 Use cases and examples