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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,559,515
Community Members
 
Community Events
184
Community Groups

How to filter ONLY user stories linked to epic with a specific label?

Hello,

 

I've created a dashboard in Jira based on rich filter like this:

project = 123 AND (Cell in (ABC, DEF, GHI, JKL, MNO, PRS, TUV) OR workstream in (ABC, DEF, GHI, JKL, MNO, PRS, TUV)) AND issuetype = in(Epic, Story) AND issue in issuesInEpics("labels in (committed_for_Q1_2023)") OR labels = committed_for_Q1_2023 OR issue in issuesInEpics("labels in (stretch_for_Q1_2023)") OR labels = stretch_for_Q1_2023 OR issue in issuesInEpics("labels in (new_for_Q1_2023)") OR labels = new_for_Q1_2023 ORDER BY issuetype ASC

Having created this, I wanted Jira to display all Epics labeled with committed_for_Q1_2023, stretch_for_Q1_2023 or new_for_Q1_2023 AND all user stories linked to these epics as well as all user stories where there's no label on epic level, but the user story is labeled independently with committed_for_Q1_2023, stretch_for_Q1_2023 or new_for_Q1_2023.

I have two rich filter controllers on my dashboard: one designed to control epics, the second to control user stories. I'd like to narrow the results down in rich filter results gadgets and display ALL user stories linked to labeled epics as well as all user stories where there's no label on epic level, but the user story is labeled independently with committed_for_Q1_2023. I use working query like that:  issuetype = Story AND labels in (committed_for_Q1_2023) and labels not in (new_for_Q1_2023)

 

Still I receive just user stories labeled, those linked to labeled epics are not displayed. I tried so many times to adjust the query and it doesn't work.

Same for: issuetype = Story and labels = stretch_for_Q1_2023 AND status != Cancelled 

Just independently labeled user stories are displayed. Those attached to epics labeled with stretch_for_Q1_2023 are omitted. 

 

Which query is superior? On dashboard level or gadget level?

I can't handle it anymore. Pls help. 

 

1 answer

0 votes
Craig Nodwell
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 04, 2023 • edited

Hi @Magdalena welcome to the community.  You need to break up your jql into something more parametrized.  Use brackets to isolate and group.

re: Something like this.  Non-Tested


project = 123 AND ((Cell in (ABC, DEF, GHI, JKL, MNO, PRS, TUV) OR workstream in (ABC, DEF, GHI, JKL, MNO, PRS, TUV)) AND issuetype = in(Epic, Story) AND (issue in issuesInEpics("labels in (committed_for_Q1_2023)") OR labels = committed_for_Q1_2023 OR issue in issuesInEpics("labels in (stretch_for_Q1_2023)") OR labels = stretch_for_Q1_2023 OR issue in issuesInEpics("labels in (new_for_Q1_2023)") OR labels = new_for_Q1_2023)

Nope, it doesn't work. There's an error:

Error in JQL Query: Expecting either a value, list or function but got 'in'. You must surround 'in' in quotation marks to use it as a value. (line 1, character 343)

 

And still I'd like to exclude epics, just see user stories under labeled epics, but not epics itself. 

Craig Nodwell
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 06, 2023

remove the epic issue type from your search string

project = 123 AND (Cell in (ABC, DEF, GHI, JKL, MNO, PRS, TUV) OR workstream in (ABC, DEF, GHI, JKL, MNO, PRS, TUV)) AND issuetype = in(Epic, Story) AND issue in issuesInEpics("labels in (committed_for_Q1_2023)") OR labels = committed_for_Q1_2023 OR issue in issuesInEpics("labels in (stretch_for_Q1_2023)") OR labels = stretch_for_Q1_2023 OR issue in issuesInEpics("labels in (new_for_Q1_2023)") OR labels = new_for_Q1_2023 ORDER BY issuetype ASC

 

If you mean the one bold and underlined, even when it's removed, epics are still there. 

Craig Nodwell
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 06, 2023

Let's break this out.

First clause.
project = 123 AND (Cell in (ABC, DEF, GHI, JKL, MNO, PRS, TUV) // returns all in project 123 and any issue in Cell = ABC, DEF, GHI, JKL, MNO, TUV

Second clause. // This is an OR clause and negates the first clause
OR workstream in (ABC, DEF, GHI, JKL, MNO, PRS, TUV)) AND issuetype = in(Epic, Story) AND issue in issuesInEpics("labels in (committed_for_Q1_2023)")   // returns all in workstream = ABC, DEF, GHI, JKL, MNO, TUV and any Epics or Stories as well as issue that are in an epic and have a Label = committed_for_Q1_2023

Third clause. // This is an OR clause and negates the first and second clause
OR labels = committed_for_Q1_2023

Fourth clause. // This is an OR clause and negates the first second, and third clause
OR issue in issuesInEpics("labels in (stretch_for_Q1_2023)") 

Fifth clause. // This is an OR clause and negates the first second, third, and fourth clause
OR labels = stretch_for_Q1_2023

Sixth clause. // This is an OR clause and negates the first second, third, fourth and fifth clause
OR issue in issuesInEpics("labels in (new_for_Q1_2023)")

Seventh clause. // This is an OR clause and negates the first second, third, fourth fifth, and sixth clause
OR labels = new_for_Q1_2023

grouping the OR statements into something like below.  I tested this using my own values.  No Epics get returned.
I think the key here is the first project statement.

project = 123 and (issueType != Epic) AND (Cell in (ABC, DEF, GHI, JKL, MNO, PRS, TUV) // first clause OR (workstream in (ABC, DEF, GHI, JKL, MNO, PRS, TUV) AND issuetype = Story AND issue in issuesInEpics("labels in (committed_for_Q1_2023)")) OR (issueType != Epic AND ((labels = committed_for_Q1_2023) OR (issue in issuesInEpics("labels in (stretch_for_Q1_2023)")) OR (labels = stretch_for_Q1_2023) OR (issue in issuesInEpics("labels in (new_for_Q1_2023)")) OR (labels = new_for_Q1_2023))) // second clause ORDER BY issuetype ASC

Error in the JQL Query: Expecting ')' before the end of the query.

 

I have message like this. I tried few configuration with '' before clause, after clause and still doesn't work. I don't know...

Craig Nodwell
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 12, 2023 • edited

Count off your open and closed ( )  make certain that the you're closing off the same number you are opening.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events