Section | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
The user
variable is used to insert information about the current user, i.e. the user triggering the transition. You can access the current user information under "Current User" section in the "Global Variables" tab of the Jira expressions editor. Click on a button to insert the expression into the editor.
You can also find the properties and methods of the user
variable from the "Data Types" tab by selecting "User" under "Select a Data type".
...
user.accountId
returns the accountId
of the user triggering the transition, e.g. accountId:5ca5b1469a000c1180956957.
user.groups
returns the list of names for all the groups the current user belongs to.
user.groups.includes("jira-users")
returns true
if the current user is a member of the "jira-users" group.
user.getProjectRoles(issue.project) returns the list of project roles the current user belongs to in the issue's project
user.getProjectRoles(new Project("TEST"))
returns the list of project roles the current user belongs to in the project with key TEST
user.getProjectRoles(issue.project).some(pr => pr.name == "Developers")
returns true
if the current user is a member of the "Developers" project role in the issue's project.
Note |
---|
The |