Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Query multiple groups when the users are only part of one group

Ian Templeton
Contributor
December 13, 2024

We have a support team that has a variety of different types of employees i.e. (FTE, CSG, Intern, etc.) so we frequently query using memberOf() to see which employee type did what. 

I want to query for CSG and Interns excluding the FTE and other groups. While the following works, is there a cleaner way to write the query to pull member of both groups? Note, the members are only part of one group.

 

project = "Our Project"

AND "Assigned Team" = Doers

AND priority in ("Priority 1", "Priority 2")

AND assignee in membersOf("CSG")

OR project = "Our Project"

AND "Assigned Team" = Doers

AND priority in ("Priority 1", "Priority 2")

AND assignee in membersOf("Intern")

 

Thanks in advance!
~Ian

1 answer

0 votes
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 14, 2024

Hi @Ian Templeton,

You could indeed shorten your query by removing quite some duplication in there like this:

Project = "Our Project" AND "Assigned Team" = Doers AND
Priority in ("Priority 1", "Priority 2") AND
(assignee in membersOf("CSG") OR assignee in membersOf("Intern"))

Hope this helps! 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events