Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

The expression parser offers multiple functions to manage user-, group- and role-related information.

Available functions

FunctionInputReturned value
isInGroup(string user_name, string group_name)

Status
colourYellow
titleString

Checks if a user is in a group. 

Status
colourGreen
titleBOOLEAN

Argument user_name can also be a comma separated list of user names, group names or role names. In that case the function will return true only if all users in the list, groups of the list, and in the roles of the list, are in the group in the second argume{nt.

Info
titleExample

isInGroup(%{...assignee}, "jira-developers") returns true if Assignee in in group jira-developers.


isInRole(string user_name, string role_name)

Status
colourYellow
titleString

Checks if a user or group of users plays a role in current project. 

Status
colourGreen
titleBOOLEAN

Argument user_name can also be a comma separated list of user names, group names or role names. In that case the function will return true only if all users in the list, groups of the list, and in the roles of the list, are in project role in the second argument, for current project.

Info
titleExample
isInRole(%{...reporter}, "Testers") returns true in Reporter is in project role Testers.


isInRole(string user_name, string role_name, string project_key)

Status
colourYellow
titleString

Checks if a user or group of users plays a role in a certain project. 

Status
colourGreen
titleBOOLEAN

Argument user_name can also be a comma separated list of user names, group names or role names. In that case the function will return true only if all users in the list, groups of the list, and in the roles of the list, are in role in the second argument, for the project in the third argument.

Info
titleExample
isInRole(%{...currentUser}, "Developers", "CRM") returns true in Current user is in project role Developers in project with key "CRM".


isActive(string user_name)

Status
colourYellow
titleString

Checks if a user is active. 

Status
colourGreen
titleBOOLEAN

Argument user_name can also be a comma separated list of user names, group names or role names. In that case the function will return true only if all users in the list, groups of the list, and in the roles of the list, are active.

Info
titleExample
isActive(%{...componentLeads}) returns true if all users who are component leaders in current project are active.


userFullName(string user_name)

Status
colourYellow
titleString

Returns a 

Status
colourYellow
titleString
with the full name of the user in argument user_name.

Argument user_name is a string with a user name, not to be confused with user full name.

Info
titleExample
userFullName(%{...currentUser}) returns the user's full name of current user.


userFullName(string list user_names)

Status
subtletrue
colourYellow
titleString []

Returns a 

Status
subtletrue
colourYellow
titleString []
with the full names of the users in argument user_names.

Argument user_names is a string list with user names, not to be confused with users full names.

Info
titleExample
userFullName(toStringList(%{...watchers})) returns a list with the users full names of current issue's watchers.


userEmail(string user_name)

Status
colourYellow
titleString

Returns a 

Status
colourYellow
titleString
with the email of the user in argument user_name.

Argument user_name is a string with a user name, not to be confused with user full name.

Info
titleExample
userEmail(%{...currentUser}) returns the email of current user.


userEmail(string list user_names)

Status
subtletrue
colourYellow
titleString []

Returns a 

Status
subtletrue
colourYellow
titleString []
with the emails of the users in argument user_names.

Argument user_names is a string list with a user names, not to be confused with users full names.

Info
titleExample
userEmail(toStringList(%{...watchers})) returns a list with the emails of current issue's watchers.


fullNameToUser(string fullName)

Status
colourYellow
titleString

Returns a 

Status
colourYellow
titleString
with the name of a user whose full name is equal to argument fullName.

Returned value is a string with a user name.

usersWithEmail(string email)

Status
colourYellow
titleString

Returns a 

Status
subtletrue
colourYellow
titleString []
with the user names of those users with emails equal to argument email.

In case that only one user is expected, function first(string list) can be used to extract a string with its user name.

userProperty(string propertyName, string userName)

Status
colourYellow
titleString

Returns the

Status
colourYellow
titleString
 value of the user property with name propertyName which belongs to user with user name userName.

If the user doesn't have the property, "" will be returned.

userProperty(string propertyName, string list userNames)

Status
colourYellow
titleString

Returns the 

Status
subtletrue
colourYellow
titleString []
of values of the user property with name propertyName in all the users whose names are contained in userNames.

The output will contain as many strings as users have the property set.

usersInRole(string projectRoleName)

Status
colourYellow
titleString

Returns the 

Status
subtletrue
colourYellow
titleString []
of user names (not be confused with full user name) of those active users playing project role with name projectRoleName in current issue's project. Parameter projectRoleName can be a comma separated list of project role names, returning the users that play any of the project roles.

usersInRole(string projectRoleName, string projectKey

Status
colourYellow
titleString

Equivalent to the previous function that returns a

Status
subtletrue
colourYellow
titleString []
 with extra argument projectKey for selecting the project argument projectRoleName refers to.

usersInGroup(string groupName)

Status
colourYellow
titleString

Returns the 

Status
subtletrue
colourYellow
titleString []
of user names of those active users in group with name groupName.

Parameter groupName can be a comma separated list of group names, returning the users that belong to any of the groups.

rolesUserPlays(string userName)

Status
colourYellow
titleString

Returns the 

Status
subtletrue
colourYellow
titleString []
of role names of those project roles the user with name userName plays in current project.

Parameter userName can also be a comma separated list of user names, group names and project role names, returning the list of project roles for those users represented by input argument.

rolesUserPlays(string userName, string projectKey)

Status
colourYellow
titleString

Returns the 

Status
subtletrue
colourYellow
titleString []
of role names of those project roles the user with name userName plays in project with key projectKey.

Parameter userName can also be a comma separated list of user names, group names and project role names, returning the list of project roles for those users represented by input argument.

groupsUserBelongsTo(string userName)

Status
colourYellow
titleString

Returns the 

Status
subtletrue
colourYellow
titleString []
of group names of those groups the user with name userName belongs to.

Parameter userName can also be a comma separated list of user names, group names and project role names, returning the list of project roles for those users represented by input argument.

defaultUserForRole(string projectRoleName)

Status
colourYellow
titleString

Returns the 

Status
colourYellow
titleString
 of the user name of the Assign to project role project role with name projectRoleName in current issue's project, or "" if no default user is defined for the project role.

defaultUserForRole(string projectRoleName, string projectKey)

Status
colourYellow
titleString

Equivalent to the previous

Status
colourYellow
titleString
 function but with extra argument projectKey for selecting the project argument projectRoleName refers to.

lastAssigneeInRole(string projectRoleName)

Status
colourYellow
titleString

Returns the

Status
colourYellow
titleString
 of user name of the last user who had current issue assigned, and currently plays project role with name projectRoleName in current issue's project, or "" if current issue was never assigned to a user currently in the project role.

lastAssigneeInRole(string projectRoleName, string issueKey)

Status
colourYellow
titleString

Returns the

Status
colourYellow
titleString
 of  user name of the last user who had issue with key issueKey assigned, and currently plays project role with name projectRoleName in current issue's project, or null if current issue was never assigned to a user currently in the project role.

leastBusyUserInRole(string projectRoleName)

Status
colourYellow
titleString

Returns the  name of the active user playing project role with name projectRoleName in current issue's project, and has the lower number of issues with resolution empty assigned; or "" if there isn't any user in the project role. Parameter projectRoleName can be a comma separated list of project role names, returning the least busy users among the project roles.

Info
titleExample
leastBusyUserInRole("Developers") returns the
Status
colourYellow
titleString
 user playing role Developers in current project with the least number of unresolved issues in all the Jira instance assigned.


leastBusyUserInRole(string projectRoleName, string projectKey)

Status
colourYellow
titleString

Equivalent to the previous function but with extra argument projectKey for selecting the project argument projectRoleName refers to.
Example: leastBusyUserInRole("Developers", "CRM") returns

Status
colourYellow
titleString
 of the user playing role Developers in project with key CRM with the least number of unresolved issues in all the Jira instance assigned.

leastBusyUserInRole(string projectRoleName, string projectKey, string jqlQuery)

Status
colourYellow
titleString

Equivalent to the previous function but with extra argument jqlQuery, used for restricting the issues to be considered to pick the least busy user as a 

Status
colourYellow
titleString
.

Info
titleExample
leastBusyUserInRole("Developers", %{...projectKey}, "project = " + %{...projectKey}) returns the user playing role Developers in current project, with the least number of unresolved issues in current project assigned.


nextUserInGroup(string groupName, string queueName)

Status
colourYellow
titleString

Returns the

Status
colourYellow
titleString
 name of the next active user in group with name groupName, for a round-robin queue with name queueName.

The string queueName is an arbitrary name. The queue is automatically created the first time a queue is used in a function call. Each time the function is called on the same pair of arguments (group, queue) , a different user in the group is returned. The queue can be used in different transitions of the same or different workflows within the same Jira instance. null is returned if group is empty.

Info
titleExample
nextUserInGroup("jira-developers", "code-review-queue") returns the username of the next user in group jira-developers for round-robin queue code-review-queue. Each time the function is called with the same pair of arguments, a different username is returned.




Div
styleline-height: 150%;
idtocContainer
classtocContainer


Panel
borderColor#333f48
bgColor#FFFFFF
titleColor#eeeeee
borderWidth1
titleBGColor#333f48
borderStylesolid
titleOn this page

Table of Contents
maxLevel3
minLevel2
indent20px
classp