Forums

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

JQL for finding all EPICs created after Jan 2020 and all distinct stories created under those epics.

Raghavendra kaushik August 18, 2023

Hi,

I am using on Premise version. Need help with a JQL to find all EPICs created after Jan 2020 and all distinct stories ( no duplicate story) created under those epics.

Any help is appreciated.

Thanks

Raghav

 

2 answers

2 accepted

2 votes
Answer accepted
Mikael Sandberg
Community Champion
August 18, 2023

You need an app that extends JQL in order to do a query like that, out-of-the-box JQL cannot do nested queries. If you check the Marketplace you will find apps that extend JQL.

Raghavendra kaushik August 22, 2023

Thanks Mkael!

0 votes
Answer accepted
Hannes Obweger - JXL for Jira
Atlassian Partner
August 20, 2023

Hi @Raghavendra kaushik

welcome to the community!

Unfortunately, this is trickier than one might think; as a "hierarchical query", it would really require some kind of join or subquery, which isn't available in plain Jira/JQL.

A few directions forward:

  • If it's a one-off thing, you could first query the relevant epics, and then use the keys of these epics in a second query, in an "Epic link" in (KEY-1, KEY-2, ...) clause.

If you want to run your search dynamically, without manually stitching two queries together, you'll need extra tooling:

  • You might be able to use Jira Automation to "propagate" epic information down to the epic's children, and then use the respective field(s) on the children to include them into your filter. Obviously, this will add a fair bit of complexity to your system.
  • There's different apps from the Atlassian Marketplace that can help with that. First, there's a number of apps that extend JQL by additional functions, including hierarchy-related functions. I've used JQL Search Extensions a few times and it works well.
  • Alternatively, you could try one of the more hierarchy-focused apps from the Marketplace. These apps typically have their own ways of figuring out parent/child relationships between issues, and provide more powerful ways of searching through issue hierarchies. I myself work on such an app, in which your use case would be easy to solve - I'll provide more details below.

Hope this helps,

Best,

Hannes

Hannes Obweger - JXL for Jira
Atlassian Partner
August 20, 2023

Just to expand on the last point, this is how this would look in the app that my team and I are working on, JXL for JiraPut simply, you'd create a sheet with all issues that are potentially relevant to you, enable Jira's default hierarchy (that's just one click) and then use JXL's advanced filtering capabilities to narrow down to the issues you're looking for. This is how this could look in action:

epic-start-date.gif

Once you have your list of issues, you can work on these directly in JXL (much like you'd do in e.g. Excel or Google Sheets), trigger various operations in Jira, or export them for further processing.

Since you've tagged your question for Jira Server: As you may have heard, apps sales have ended for Jira Server. Are you planning to migrate to Data Center or Cloud? I'd strongly recommend that. If you need some more time, JXL is perfectly compatible with Jira Server; it's just that we need to generate a license for you. If the above looks interesting, just let me know, and I'll happily start a free trial for you.

Like Raghavendra kaushik likes this
Raghavendra kaushik August 22, 2023

Thanks Hannes for all the guidance!

Suggest an answer

Log in or Sign up to answer