# membersOf() in JQL: syntax and examples

URL: https://goingstellar.ro/reference/jql/membersof/

membersOf() expands a group into the list of its members. Use it with IN or NOT IN on a user field to find work for a whole group, or to leave a group out. Teams work too, but only through their team ID.

## Syntax

```
membersOf("group-name")
membersOf(id:<teamId>)
membersOf(id:<groupId>)
```

## Arguments

- `group` (optional: no): The group name, quoted if it has special characters. For a team or a group ID, write id: followed by the ID. Team names do not work, only the team ID from the team profile URL.

## Works with

- Fields: Assignee, Reporter, Voter, Watcher, Creator, custom fields of type User
- Operators: IN, NOT IN, WAS IN, WAS NOT IN
- Not with: =, !=, ~, !~, >, >=, <, <=, IS, IS NOT, WAS, WAS NOT, CHANGED

## Examples

```
assignee in membersOf("jira-users-overheat") AND statusCategory != Done AND project = WEB
```

Open website work held by anyone in the main user group. It ignores whoever is assigned, as long as they are in the group. Run on Jira Cloud on 2026-11-29.

```
reporter in membersOf("jira-admins-overheat") OR reporter in membersOf("org-admins")
```

Everything raised by either admin group. Two membersOf() calls joined by OR cover several groups. Run on Jira Cloud on 2026-11-29.

```
assignee not in membersOf("jira-admins-overheat") AND statusCategory != Done
```

Unfinished work owned by people outside the admin group, for a hand-over review. Run on Jira Cloud on 2026-11-29.

```
reporter in membersOf("org-admins") AND created >= startOfWeek("-4w") ORDER BY created DESC
```

What the org-admins group raised in the last four weeks, newest first. Run on Jira Cloud on 2026-11-29.

```
assignee in membersOf("jira-users-overheat") AND sprint in openSprints() AND statusCategory != Done
```

Group workload inside running sprints, to see who still carries unfinished work. Run on Jira Cloud on 2026-11-29.

## Pitfalls

- A wrong group name fails the whole query: "Function 'membersOf' can not generate a list of usernames for group 'no-such-group'; the group does not exist."
- The function returns a list, so `assignee = membersOf("jira-users-overheat")` fails with "Operator '=' does not support the list value 'membersOf(jira-users-overheat)' for field 'assignee'." Use IN.
- If the group has more than 10,000 users the search does not run. Split a huge umbrella group into smaller ones.

## Questions and answers

### Can membersOf() take a team name?

No. The docs say teams do not work with team names. You must pass the team ID, for example membersOf("id:"), taken from the team profile URL.

## Related

- [currentUser()](https://goingstellar.ro/reference/jql/currentuser/)
- [IN](https://goingstellar.ro/reference/jql/in-operator/)
- [assignee](https://goingstellar.ro/reference/jql/assignee-field/)
- [reporter](https://goingstellar.ro/reference/jql/reporter-field/)
- [NOT IN](https://goingstellar.ro/reference/jql/not-in-operator/)
- [WAS IN](https://goingstellar.ro/reference/jql/was-in-operator/)

## Sources

- [JQL functions (Atlassian Support, Jira Cloud)](https://support.atlassian.com/jira-software-cloud/docs/jql-functions/)
- [JQL fields (Atlassian Support, Jira Cloud)](https://support.atlassian.com/jira-software-cloud/docs/jql-fields/)

