Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Overview
JWT The expression parser offers multiple functions to manage user-, group- and role-related information.
Available functions
Function | Input | Returned value | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
isInGroup(string user_name, string group_name) |
| Checks if a user is in a group. 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.
| |||||||||||||||||||||
isInRole(string user_name, string role_name) |
| Checks if a user or group of users plays a role in current project. 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.
| |||||||||||||||||||||
isInRole(string user_name, string role_name, string project_key) |
| Checks if a user or group of users plays a role in a certain project. 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.
| |||||||||||||||||||||
isActive(string user_name) |
| Checks if a user is active. 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.
| |||||||||||||||||||||
userFullName(string user_name) |
| Returns a Argument user_name is a string with a user name, not to be confused with user full name.
| |||||||||||||||||||||
userFullName(string list user_names) |
| Returns a Argument user_names is a string list with user names, not to be confused with users full names.
| |||||||||||||||||||||
userEmail(string user_name) |
| Returns a Argument user_name is a string with a user name, not to be confused with user full name.
| |||||||||||||||||||||
userEmail(string list user_names) |
| Returns a Argument user_names is a string list with a user names, not to be confused with users full names.
| |||||||||||||||||||||
fullNameToUser(string fullName) |
| Returns a Returned value is a string with a user name. | |||||||||||||||||||||
usersWithEmail(string email) |
| Returns a 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) |
| Returns the If the user doesn't have the property, | |||||||||||||||||||||
userProperty(string propertyName, string list userNames) |
| Returns the The output will contain as many strings as users have the property set. | |||||||||||||||||||||
usersInRole(string projectRoleName) |
| Returns the | |||||||||||||||||||||
usersInRole(string projectRoleName, string projectKey) |
| Equivalent to the previous function that returns a | |||||||||||||||||||||
usersInGroup(string groupName) |
| Returns the Parameter groupName can be a comma separated list of group names, returning the users that belong to any of the groups. | |||||||||||||||||||||
rolesUserPlays(string userName) |
| Returns the 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) |
| Returns the 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) |
| Returns the 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) |
| Returns the | |||||||||||||||||||||
defaultUserForRole(string projectRoleName, string projectKey) |
| Equivalent to the previous | |||||||||||||||||||||
lastAssigneeInRole(string projectRoleName) |
| Returns the | |||||||||||||||||||||
lastAssigneeInRole(string projectRoleName, string issueKey) |
| Returns the | |||||||||||||||||||||
leastBusyUserInRole(string projectRoleName) |
| 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
| |||||||||||||||||||||
leastBusyUserInRole(string projectRoleName, string projectKey) |
| Equivalent to the previous function but with extra argument projectKey for selecting the project argument projectRoleName refers to. | |||||||||||||||||||||
leastBusyUserInRole(string projectRoleName, string projectKey, string jqlQuery) |
| 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
| |||||||||||||||||||||
nextUserInGroup(string groupName, string queueName) |
| Returns the 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
|
Div | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||
|