How to strictly evaluate membersOf("group") in JQL for multi user picker?

Marlene Koh March 23, 2021

Background:

I have a custom field "Assignee(s)" which is a multi user picker.

  • Group 1: Amy, Ben
  • Group 2: Carol, Danny

The "Assignee(s)" field can contain members from both Groups 1 and 2.

  • e.g. Assignee(s): Amy, Carol

 

Problem:

I would like to show issue statistics in the dashboard by Group 1.

My jql now is "Assignee(s)" in membersOf("Group 1")

  • e.g. Example of Issue Statistics Dashboard Gadget:Capture.PNG

I would like Assignee(s) to only show "Amy" | 9 | 90% for example.

However, now the issue statistics is showing both 

  • "Amy"  | 9 | 90%
  • "Carol" | 1 | 10%

I would like to omit any users in the "Assignee(s)" field that do not belong to Group 1 (i.e. remove Carol from the Issue Statistics Gadget).

 

Is this possible to configure via JQL? 

1 answer

1 accepted

2 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 23, 2021

It is "strictly evaluating" the JQL.  You are looking in the wrong place for a "fix" to this.

JQL is not SQL, which is something people misunderstand a lot.  A JQL query gives you nothing more than a list of matching issues.  It really is just the search part of what you're doing.  The JQL has nothing to say about the data it returns, it's a list of issues.

So, think of your "Assignee(s)" in membersOf("Group 1")  as returning a list of issues, not a display of them.  In your example, you're getting 11 issues on that list.

Now, entirely separately, you've decided to use a filter statistics gadget to display the results.  You've told that to show you the assignee(s) field.  So it is showing you all the assignee(s)s entries it finds in the list of issues that the JQL has given it.

Note that it is not reading the JQL, it is reading the list of issues the JQL gives it.  The gadget has no way to know that you want to ignore some of that data. 

So, the short answer is that to achieve your results, you'll need to find a gadget that can be told to suppress some of the values returned.

Suggest an answer

Log in or Sign up to answer