Hello Atlassian Community Team,
I have the following use case, and I need some help.
Use Case:
We have the following Labels across 5 JIRA stories - Customer-Experience, UAT, Operations, FY26Q1, FY26Q2.
Story - 1: Customer-Experience, UAT, Operations, FY26Q1, FY26Q2.
Story - 2: Customer-Experience, UAT, Operations, FY26Q1.
Story - 3: Operations, FY26Q1, FY26Q2.
Story - 4: UAT, Operations, FY26Q1, FY26Q2.
Story - 5: Customer-Experience, UAT, Operations, FY26Q1, FY26Q2.
But I only need Customer-Experience and Operations to show without the other 3 labels being listed.
I tried following queries, But it does bring out all the results.
Please help with the Query, if not please suggest what other options can be used in this case.
Thanks,
Mahesh
Hi @Mahesh -- Welcome to the Atlassian Community!
A JQL expression helps search for work items / issues meeting the criteria. It does not impact filtering the specific values of fields shown in the results.
What problem are you trying to solve by searching for work items containing those two label values but not show all label values? That is, "why do this?"
Knowing that may help the community to offer better suggestions.
Kind regards,
Bill
Hello @Bill Sheboy
Thanks for the quick response.
I am trying to plot a Gadget (Pie Chart) against these 5 stories and I wanted to know how many the Count to show how many are part of Customer Experience and How many are part of Operations.
Thanks,
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information, and...
With the built-in dashboard pie chart gadget, there is no additional filtering to do that. Workarounds would be needed, such as:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For the first approach, I meant using something like the Filter Results gadget with a query specifically for one of the Labels. Then do not display the labels as the count (and perhaps gadget name) would indicate what is needed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To select just one of the labels do that with the JQL:
project = XXXXX
AND issuetype = Story
AND status = Done
AND labels IN (Customer-Experience)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This returns 3 stories again with other Labels in it,
Story - 1: Customer-Experience, UAT, Operations, FY26Q1, FY26Q2.
Story - 2: Customer-Experience, UAT, Operations, FY26Q1.
Story - 5: Customer-Experience, UAT, Operations, FY26Q1, FY26Q2.
That's not my requirement though, I do want to have only Stories with Customer Experience and Operations as labels without other labels.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It appears you have repeatedly changed your scenario. Which one of these applies:
#1: Return work items which have one-and-only-one label, where that label is either "Customer-Experience" or "Operations". (In fact, none of the original work item examples you show in your question would match this case.)
#2: Return work items which have at least have the label "Customer-Experience" or "Operations" and only display those specific labels in the results even when the work item contains other labels.
I believe the first one (i.e., has only one label) is not possible with built-in JQL features as it can neither count labels nor perform a query join (to remove work items with other labels from the results). Possible workarounds are:
If it is the second one (i.e., display only one label), please see my earlier responses describing how to do this.
Regardless of which is desired, I recommend pausing and meeting with your Jira Site Admin to describe the need and request coaching on JQL and use of dashboards to answer questions about work items.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.