Versions Compared

Key

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

Description:

Excerpt

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:

Code Block
languagesql
themeConfluence
reporter IN membersOfRole("Developers")

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

Code Block
languagesql
themeConfluence
project = EMEA AND reporter IN membersOfRole("Team Leads")

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

Code Block
languagesql
themeConfluence
reporter IN membersOfRole("Engineers", "EMEA")

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

Code Block
languagesql
themeConfluence
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

Page Tree
rootJQL Function Reference
startDepth2