The expression parser offers multiple functions to manage user-, group- and role-related information. STRING Checks if a user is in a group. BOOLEAN 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. Example STRING Checks if a user or group of users plays a role in current project. BOOLEAN 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. Example STRING Checks if a user or group of users plays a role in a certain project. BOOLEAN 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. Example STRING Checks if a user is active. BOOLEAN 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. Example STRING Returns a STRING 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. Example STRING [] Returns a STRING [] 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. Example STRING Returns a STRING 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. Example STRING [] Returns a STRING [] 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. Example STRING Returns a STRING with the name of a user whose full name is equal to argument fullName. Returned value is a string with a user name. STRING Returns a STRING [] 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. STRING Returns the STRING value of the user property with name propertyName which belongs to user with user name userName. If the user doesn't have the property, STRING Returns the STRING [] 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. STRING Returns the STRING [] 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. STRING Equivalent to the previous function that returns a STRING [] with extra argument projectKey for selecting the project argument projectRoleName refers to. STRING Returns the STRING [] 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. STRING Returns the STRING [] 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. STRING Returns the STRING [] 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. STRING Returns the STRING [] 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. STRING Returns the STRING of the user name of the Assign to project role project role with name projectRoleName in current issue's project, or STRING Equivalent to the previous STRING function but with extra argument projectKey for selecting the project argument projectRoleName refers to. STRING Returns the STRING 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 STRING Returns theSTRING 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 STRING 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 Example STRING Equivalent to the previous function but with extra argument projectKey for selecting the project argument projectRoleName refers to. STRING 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 STRING. Example STRING Returns the STRING 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 ExampleOverview
Available functions
Function Input Returned value isInGroup(string user_name, string group_name) isInGroup(%{...assignee}, "jira-developers")
returns true if Assignee in in group jira-developers. isInRole(string user_name, string role_name) isInRole(%{...reporter}, "Testers")
returns true in Reporter is in project role Testers. isInRole(string user_name, string role_name, string project_key) isInRole(%{...currentUser}, "Developers", "CRM")
returns true in Current user is in project role Developers in project with key "CRM". isActive(string user_name) isActive(%{...componentLeads})
returns true if all users who are component leaders in current project are active. userFullName(string user_name) userFullName(%{...currentUser})
returns the user's full name of current user. userFullName(string list user_names) userFullName(toStringList(%{...watchers}))
returns a list with the users full names of current issue's watchers. userEmail(string user_name) userEmail(%{...currentUser})
returns the email of current user. userEmail(string list user_names) userEmail(toStringList(%{...watchers}))
returns a list with the emails of current issue's watchers. fullNameToUser(string fullName) usersWithEmail(string email) userProperty(string propertyName, string userName) ""
will be returned. userProperty(string propertyName, string list userNames) usersInRole(string projectRoleName) usersInRole(string projectRoleName, string projectKey) usersInGroup(string groupName) rolesUserPlays(string userName) rolesUserPlays(string userName, string projectKey) groupsUserBelongsTo(string userName) defaultUserForRole(string projectRoleName) ""
if no default user is defined for the project role. defaultUserForRole(string projectRoleName, string projectKey) lastAssigneeInRole(string projectRoleName) ""
if current issue was never assigned to a user currently in the project role. lastAssigneeInRole(string projectRoleName, string issueKey) null
if current issue was never assigned to a user currently in the project role. leastBusyUserInRole(string projectRoleName) ""
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. leastBusyUserInRole("Developers")
returns the STRING 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)
Example: leastBusyUserInRole("Developers", "CRM")
returns STRING 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) 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) (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. 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.
🚀 Effective since April 2020 and JWT version 2.9.0 Automation Toolbox for Jira is fully integrated into our top rated app Jira Workflow Toolbox (JWT). 🚀