Get the EPICS, their STORIES and thier subtasks for these stories in this order for a project


We need a filter to get all the Epics with the Stories linked to them below, and all the Tasks linked to each Story below of each one.

Could you let me know how to do it ?

Thanks a lot.

1 answer

0 votes

Hi Andrea,

With a standard JQL query you wouldn't be able to do that.  You can find the linked issues in the Epics by using the IN keyword, however, you would need to specify which Epic you're looking for the issues in. In regards to add-ons, some suggestions I have heard for this particular functionality are the Links Hierarchy for JIRA & Agile or the Structure Plugin by Almworks.  Please see this post for more information in regards to those add-ons and some further ideas.

You may want to look at a database query instead.  Here is a link to the database schema.  You can use this to create a custom query to get the data you need.



Thanks for your answer.

We have installed and tested the "Structure" Plugin, but -as its  support comfirmed- it does not support comparissons using the Sprint field.

Are you aware of any other plugin/add on that supports it?

For example, we need to know if an Epic is planned for a Sprint that is equal or greater than the Sprint its children are planned for.

Thank you very much in advance.


We also tried to accomplish this using "Links Hierchy for JIRA" plugin, but it didn't work.
So we installed the "Database Scheme Generator" -as recommended above- and we obtained a DB scheme.
But now, we wonder how can we run SQL queries against the DB in order to obtain the records we're interested in? Do we need an addition plugin or reporting tool that can read the DB scheme?
REMINDER: between other inconsistencies, we are trying to list Epics that are planned for a Sprint that is minor/previous than the "top" or "latest" Sprint its child Stories are planned for.
Epic 1 (planned for Sprint 1)
|-- Story 1 (planned for Sprint 1)
|-- Story 2 (planned for Sprint 2)
the Epic should be planned for at least for Sprint 2.

Thanks in advance.

Hi! Could you take a look to this question ? We are blocked by this issue.
Please let us know if you have any answer.

Hi Andrea,

The link I provided for the db schema was to provide the tables that you need to query.  You would need to formulate a query that matches your needs and you can run the query directly in the database using your database's tools such as pgAdmin III for Postgres or the command line.

The other option would be an add-on such as ScriptRunner



Hi Branden,

I was reviewing th pgAdminIII tool documentation and it requires a Database connection. Do you know the steps to do this connection to the JIRA db ?

Thanks in advances.

Hi Andrea,

We never clarified whether this was a Cloud instance or an on-premise instance.  If this is an on-premise instance you will need to first verify you're using Postgres as your backend database.  If that is the case when you open pgAdmin you would add the server information as a new Connection.  You can find the connection information for your instance in the JIRA_HOME/dbconfig.xml file. 

If you are using Microsoft SQL Server or Oracle you would use Microsoft SQL Server Management Studio or RazorSQL.

If this is a Cloud instance you would need to use an add-on such as ScriptRunner since there is no access to the backend database in a hosted instance per the Restricted functions in Atlassian Cloud apps knowledge base article.



It is JIRA Server Intances.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,686 views 3 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you