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
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!
Thank you for the suggestion @Walter Buggenhout!
Unfortunately, that doesn't work as the OR pulls in items for the group members from other projects, statuses, priorities, etc. outside what's scoped for the first group.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That surprises me, as that's what the extra parentheses around the assignee part are there to prevent from happening:
(assignee in membersOf("CSG") OR assignee in membersOf("Intern"))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for following up @Walter Buggenhout!
Full transparency, I missed the extra parentheses around the assignee part, which does work when included. Thank you!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.