Skip to main content
Skip table of contents

Dependencies using the current user

It may be useful to display data related to the logged-in user. To do that, you can reference current user attributes in a Custom field query.

The $currentUser variable is available and exposes 5 attributes:

TypeName

Description

Example
String
displayName

Returns a string which corresponds to the logged-in user display name

$currentUser.displayName

> "John Doe"
StringemailAddressReturns a string which corresponds to the logged-in user email address$currentUser.emailAddress

> "john.doe@elements-apps.com"
StringaccountId Returns a unique identifier which corresponds to the logged-in user Atlassian account ID
$currentUser.accountId

> "8878ccae-33566-3e50-b27a"
Stringlocale Returns a string which corresponds to the logged-in user locale
$currentUser.locale

> "fr_FR"
StringtimeZone Returns a string which corresponds to the logged-in user timezone
$currentUser.timeZone

> "Europe/Berlin"


If we go back to our previous example, we could highly simplify the process by only configuring one custom field, based on the logged-in user:

Model

Considering each car is linked to its owner in the data source, we can configure the following request:

CODE
SELECT model
FROM car_models
WHERE car_owner ='$currentUser.emailAddress'

Only cars from the logged-in user will be available as options of the custom field

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.