The JQL query project IN projectsWhereUserHasRole("Sales") filters for issues in projects wherethe user running the query has theSalesproject role. Since Leila is a member of theSales groupand receives the filter subscription, the issues she receives are those from projects whereLeila is in the Sales role(Option A).
Explanation of the Correct Answer (Option A):
The JQL functionprojectsWhereUserHasRole("Sales")returns a list of projects where the user executing the query is a member of theSalesproject role. The query project IN projectsWhereUserHasRole("Sales") selects all issues from those projects.
Leila, as a member of theSales group, receives the filter subscription. When the subscription runs for Leila, the JQL query is evaluated in her context, meaning it returns issues from projects whereLeilahas theSalesproject role.
Exact Extract from Documentation:
Advanced searching - functions reference
TheprojectsWhereUserHasRole("role")function returns projects where the user running the query is a member of the specified project role.
Example:
project IN projectsWhereUserHasRole("Sales") returns issues from projects where the user has theSalesproject role.Note: For filter subscriptions, the query is executed in the context of each recipient, so results depend on the recipient’s role membership.(Source: Atlassian Support Documentation, "Advanced searching - functions reference")
Why This Fits: The filter subscription runs the JQL query for Leila, returning issues from projects whereLeila is in the Sales role, making Option A the correct answer.
Why Other Options Are Incorrect:
Issues assigned to anyone in the Sales group (Option B):
The JQL query does not filter byassigneeor group membership. It only selects issues based on the projects where the user has theSalesrole, regardless of who the issues are assigned to.
Extract from Documentation:
To filter by assignee, use assignee in membersOf("group"). TheprojectsWhereUserHasRolefunction filters by project, not assignee.
(Source: Atlassian Support Documentation, "Advanced searching - fields reference")
Project roles are project-specific and distinct from groups. UseprojectsWhereUserHasRolefor roles, notmembersOffor groups.
(Source: Atlassian Support Documentation, "Advanced searching - functions reference")
To filter by assignees in a role, additional JQL or scripting is needed.projectsWhereUserHasRoleonly filters by project.
(Source: Atlassian Support Documentation, "Advanced searching - fields reference")
Additional Notes:
TheSalesproject role must exist in the relevant projects, and Leila must be added to it inProject settings > Peoplefor those projects.
The subscription sends emails to theSales group, and each recipient (like Leila) seesissues based on their own role membership in the JQL query’s context.
Leila must haveBrowse Projectspermission for the projects returned by the query to see the issues.
[:, Atlassian Support Documentation:Advanced searching - functions reference, Atlassian Support Documentation:Advanced searching - fields reference, Atlassian Support Documentation:Manage filters in Jira Cloud, , , ]
Submit