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

Workaround to using "Teams" in jql

Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 24, 2023

Since this ticket is not yet fixed https://jira.atlassian.com/browse/JRACLOUD-74842, and using the "Team" in our jql queries might be useful.

Currently the closest alternative to using "Team[Team]" = "Team1" in JQL, was using assignee/reporter in ("<members of the Team>"), the problem with this is that we don't want to keep updating this filter manually, and if the members of the team change, we need to manually update the members in the filter too.

To address this manual intervention I used the Jira Automation available OOB.The automation will periodically update the filter with the members of the team, and we can then use this filter in a JQL in place of the TEAMS. Eg.

* Filter 1 will have all assignee who are part of team 1 : "assignee in ("Team 1 members")

* Filter 2 will build on top of the first filter : " Project = XYZ and filter = "Filter 1"

---

Below if the structure of the automation:

* Trigger : Scheduled after ever 4 Hrs

* Action 1: Fetch members of a certain TEAM using API
image.png

* Action 2: Patch "Filter 1" using the members received from the above web request

image.png

Variables used in the above images, need to be substituted by the end users as per their scenario :

* Sitename: Name of the Site you want the Team to be fetched from

* TeamID: UID of the team you need to fetch members from

* FilterID : Filter that needs to be patched with the team members

---

Links for reference:

* https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-filters/#api-rest-api-3-filter-id-put

* https://developer.atlassian.com/platform/atlassian-graphql-api/graphql/#teams_teamV2

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events