Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Search for all the stories for a list of epics

Puneet Sharma
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 29, 2020

project = PL AND issuetype = Epic AND fixVersion = "RNO - WA - Predictive Auto" ORDER BY issuetype DESC, key ASC

This is my search query for all the epics related to an initiative. I want to search for bunch of stories that are child of these epics and have a label of "iPub". I tried using Parent and "Epic Link" but both of them are giving me error. Here is my modified query

parent in (PL AND issuetype = Epic AND fixVersion = "RNO - WA - Predictive Auto" ) ORDER BY issuetype DESC, key ASC

And this is the error that I am getting 
Error in the JQL Query: Expecting ')' but got 'AND'. (line 1, character 15)

3 answers

1 vote
Jack Nolddor _Sweet Bananas_
Atlassian Partner
July 29, 2020

Hi,

Sadly you cannot achieve the desired search using standard features on Jira, you must go for a third-party app instead. Using i.e. JQL Booster Pack (if you are on Server / DataCenter) you can type the following:

 

1) A bunch of Epics

project = PL AND issuetype = Epic AND fixVersion = "RNO - WA - Predictive Auto" 

 

2) Find all tasks (Tasks, Stories,...) under a given Epics

issue IN issuesInEpics(' project = PL AND issuetype = Epic AND fixVersion = "RNO - WA - Predictive Auto"  ')

(*) Note that this is just an example, you must tune above query to fit your needs.

 

Using this app you can also query other issues relations, check:

 

Regards

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2020

Hi @Puneet Sharma  -- Welcome to the Atlassian Community!

You cannot do this type of nested query with out-of-the-box JIRA.  If you have one of the scripting add-on products from the marketplace, it is possible.

As a work-around you can:

  • Run a query to get your epic list
  • Export that result list
  • Grab just the keys, and convert them into comma-separated values (CSV) using a text editor
  • Paste the CSV epic list into your second query:
"Epic Link" IN (yourCSVlist) AND labels = iPub ORDER BY "Epic Link", Key

 

Best regards,

Bill

Smita Bhatnagar February 8, 2022

Hi Bill,

I am trying your way but am getting the error  "The operator 'in' is not supported by the 'Epic Link' field. " 

 

Thanks

Smita

0 votes
Reshma Begum {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2020

Hi @Puneet Sharma ,

 

If you have the list of Epic Id's, then you can use the below JQL to fetch all child stories of that Epic.

project = test1 AND parentEpic = TES-3 AND type = Story

 

Hope it helps!

 

Thanks,

Reshma

Puneet Sharma
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 29, 2020

I don't want to type all the epic ids as there are 36 epics. That's why I was trying to use the ParentEpic IN operator like this:

parentEpic IN (project = PL AND issuetype = Epic AND fixVersion = "RNO - WA - Predictive Auto" )

which is giving error to me.

Like Ramona Popa likes this
Reshma Begum {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2020

Hi @Puneet Sharma ,

 

As every story created from a Epic has Epic link, you can search using the below JQL.

 

project = test1 AND type = Story AND "Epic Link" is not EMPTY

 

Hope it helps!

 

 Thanks,

Reshma

Inayat Nahvi
Contributor
July 29, 2020

@Puneet Sharma , to follow up on what @Reshma Begum {Appfire} suggested, maybe include the label in you JQL to narrow it down further.

 

project = test1 AND type = Story AND "Epic Link" is not EMPTY AND labels = iPub ORDER BY "Epic Link" ASC

 

Then, include Epic Link in your filter columns, and sort on Epic Link.  Hope this also helps.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events