membersOfRole()

Description:

Perform searches based on the members of a particular project role.

If any project is provided, all visible projects for the current user will be used while searching for members in the given role.


Syntax

membersOfRole(role)
membersOfRole(role, project, ...)

Available sincev1.6.0-RELEASE
Supported fieldsAssignee, Reporter, Voter, Watcher, custom fields of type User
Supported operatorsIN , NOT IN
Unsupported operators

= , != , ~ , !~ , > , >= , < , <=

IS , IS NOT , WAS , WAS IN , WAS NOT , WAS NOT IN , CHANGED

Examples:

• Find issues that have been reporter by members of 'Developers' role:

reporter IN membersOfRole("Developers")

• Find issues on EMEA project that have been reporter by members of 'Team Leads' role regardless of the project:

project = EMEA AND reporter IN membersOfRole("Team Leads")

• Find issues on any project that have been reporter by members of EMEA Project 'Engineers':

reporter IN membersOfRole("Engineers", "EMEA")

• Find issues on HelpDesk project that are assigned to 'Support L3' members of this project:

project = HelpDesk AND assignee IN membersOfRole("Support L3", "HelpDesk")


Real World Use Cases:

· Does Scriptrunner support assignee in role('Role Name')? (by David May at ATLASSIAN Community)
· SRJIRA-2247 - Query User Picker fields by role (by Jonny Carter)
· JRASERVER-21711 - Add membersOfProjectRole function to JQL
(by Larry Shatzer, Jr.)
· JRASERVER-19811 - Jira Query Language function membersOf("") (by Rodolfo Romero)
·
How to search for issues related to members of a specific project role? (by chris o'connor at ATLASSIAN Community)

JQL Function Reference