Skip to main content

How to write JQL that encompasses all of the issues in an initiative

Initiatives have linked Epics.  Epics have issues in them.  The issues may have sub-tasks in them.  We need one query that returns all of this.

First write a query to get all of the Initiative's Epics...

Epics in an Initiative

The JQL to find the Epics in an Initiative is...

SQL
issueFunction in linkedIssuesOf("key = INITIATIVE-1", "is implemented by")

Replace "INITIATIVE-1" with your Initiative key.  Save the filter as "Initiative Epics (INITIATIVE-XX)".

Next, write a filter that gets all of the issues within those Epics...

Issues in the Initiative Epics

The JQL to find the issues in the Initiative's Epics is...

SQL
issuefunction in linkedIssuesOf("filter='Initiative Epics (INITIATIVE-1)'", "is Epic of")

Replace "INITIATIVE-1" with your Initiative key.  Save the filter as "Initiative Issues (INITIATIVE-XX)".

Next, write a filter that pulls together the results of these two queries (plus adds a bit to pull in related sub-tasks)...

All Epics and Issues in an Initiative

The JQL to find all of the Epics, issues, and sub-tasks of those issues in an initiative is...

SQL
issueFunction in linkedIssuesOf("key = INITIATIVE-1", "is implemented by") OR issuefunction in linkedIssuesOf("filter='Initiative Epics (INITIATIVE-1)'", "is Epic of") OR issueFunction in subtasksOf("filter ='Initiative Issues (INITIATIVE-1)'") ORDER BY Rank ASC

That final filter includes everything under the Initiative.

Note the addition of "ORDER BY Rank ASC" in the final filter.  This is required to use the filter as the foundation a project board (so the ScrumMaster and Product Owner can rank the issues).

For others to be able to access this, you need to share all three saved filters.  This final filter would be used for the project board.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.