leastBusyUserInRole()

This function returns the name of the user in a given project role (in the current issue's project) with the lowest number of unresolved issues.

An empty text "" will be returned if there is no user in the project role.

Multiple project roles can be specified in a comma-separated list of project role names, returning the least busy users among the project roles.


Bash
leastBusyUserInRole(projectRole) #Output: Text


Examples

Parser expression

Description

Bash
leastBusyUserInRole("Developers")

This example returns the user among all users of the Developers project role in the current project with the lowest number of unresolved issues across all Jira projects, e.g.:

admin.istrator

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

projectRole

text

Text containing a valid project role name. Multiple project roles can be specified in a comma-separated list of project role names.

Output

This function returns a text

Variant where you can additionally define a specific project key.


Bash
leastBusyUserInRole(projectRole, projectKey) #Output: Text


Examples

Parser expression

Description

Bash
leastBusyUserInRole("Developers", "CRM")

This example returns the user among all users of the Developers project role in the CRM project with the lowest number of unresolved issues across all Jira projects, e.g.:

admin.istrator


Additional information

Parameters used in this function

Parameter

Input (data type)

Description

projectRole

text

Text containing a valid project role name. Multiple project roles can be specified in a comma-separated list of project role names.

projectKey

text

Text containing a valid project key.

Output

This function returns a text


Variant where you can additionally define a specific JQL query to limit the scope of unresolved issues.


Bash
leastBusyUserInRole(projectRole, projectKey, jqlQuery) #Output: Text


Examples

Parser expression

Description

Bash
leastBusyUserInRole("Developers", %{issue.project.key}, "type = Bug"})

This example returns the name of the user, who is a member of the current issues' project role Developers and has the lowest number of unresolved Bugs assigned across all Jira projects, e.g.:

admin.istrator

Bash
leastBusyUserInRole("Projektmitarbeiter (intern)", %{issue.project.key}, "project =" + %{issue.project.key})

This example returns the name of the user, who is a member of the current issues' project role Developers and has the lowest number of unresolved

issue assigned in the current Jira project, e.g.:

admin.istrator

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

projectRole

text

Text containing a valid project role name. Multiple project roles can be specified in a comma-separated list of project role names.

projectKey

text

Text containing a valid project key.

jqlQuery

text

Text containing a valid JQL query. 

Output

This function returns a text

This function is useful if you want to automatically assign issues to the least busy user using a post function or automation rule, e.g.:


📚 Use cases and examples