JQL to Return Epics and Stories with link type mitigated by, and also children of an epic

Jim May 4, 2023

(project = "IS") OR (project In ("AO","CE","DET","EEBT","KNIGHTS") AND (issueLinkType IN ("mitigates ","Is mitigated by") OR [child of epic that has a link type of mitigates] ))

Here is my query.  Works great except for the plain english part I am asking about here.  

I need it to return Issues (Epics and Stories) that have a link type of mitigates, but I also want it to return the children of the epic with the link type mitigates.  

Using the exception JXL:
Hierarchy is

  •  IS Issue Type
    • Epics or Stories with link type Mitigated by
      • Stories that are children of Epics with the link type of Mitigated by

2 answers

1 vote
Hannes Obweger - JXL for Jira
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 4, 2023

Hi @Jim

do I understand correctly that you want to see this hierarchy in JXL?

If this is the case, you shouldn't really have to worry too much about the JQL statement, but let JXL do its magic through a custom issue structure. Here's how I would go with this:

1.) Create a new sheet with a sheet scope (i.e., JQL statement) that includes any issues that could be potentially relevant for your hierarchy. Looking at your current query, this could be

(project = "IS") OR (project In ("AO","CE","DET","EEBT","KNIGHTS") AND (issueLinkType IN ("mitigates ","Is mitigated by") OR issuetype = "Story"))

... but depending on the amount of issues we're dealing with, this could potentially also be much broader, like

project In ("IS", "AO"," CE", "DET", "EEBT", "KNIGHTS")

The important thing is that you don't really have to worry about the epic/story relationship - JXL will sort this out for you!

2.) In your sheet, configure a structure that looks similar to this:

structure-definition.png

3.) You should now see your issue hierarchy! Depending on your exact JQL statement, there will likely be some issues in there that are "outside" of your hierarchy and you don't really care about. You can simply hide these via the level visibility settings, like so:

level-visibility.png

... and this should be it!

Please let me know if this works. If there's any further questions, it may be easier to reach out to us directly - we're here to help!

Best,

Hannes from the JXL team

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 4, 2023

Hello @Jim 

Welcome to the Atlassian community.

Natively Jira does not have a JQL feature to enable you to retrieve children of multiple Epics unless you want to explicitly list the Epic issue keys.

There are third party apps that provide additional JQL functionality that would enable you do retrieve children of Epics where you provide a JQL for the Epics themselves. Adaptavist ScriptRunner is one such app. It provides an issuesInEpics() function that takes a JQL statement as its parameter.

Suggest an answer

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

Atlassian Community Events