How to get epic links with underlying query

Alexander Kraus November 30, 2022

Hi all,

 

I'm struggling to get the expected results, hope the community can help me!

I want to get tasks that are linked to specific issues.

 

I can find these tasks with the query

issuetype = task AND "Epic LINK" in (key 1, key 2, key 3)

-> that's already helpful for me

 

But I want to find the keys to the EPICs in above query based on a filter like

issuetype = EPIC AND "program increment" = PI_3

 

How do I combine both queries to find all tasks in EPICs part of PI_3 without always manually searching for the corresponding keys and entering them manually as I did in query #1?

 

Thanks for your help!

2 answers

1 accepted

1 vote
Answer accepted
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.
November 30, 2022

Hello @Alexander Kraus 

Welcome to the community.

What you want to do is not supported natively by the Jira Cloud product. You would need to add a third party app that extends the Jira JQL capabilities to get what you want.

For example, I have used the Adaptavist ScriptRunner app. It would allow you to do this by providing a function to get the child issues of Epics based on a filter used to specify the Epics.

issuesInEpics

issuesInEpics(subquery)

This function allows you to find issues related to epics found by the subquery. For example, find all stories for open Epics in a project:

issueFunction in issuesInEpics("project = DEMO AND status = 'To Do'")

issueFunction in issuesInEpics("resolution IS NOT EMPTY") AND resolution IS EMPTY

Alexander Kraus December 1, 2022

Hi @Trudy Claspill , thanks a lot for your comment!

issueFunction in issuesinEpics works like a charm for me. Now I was able to set up a great dashboard which offers the overview I needed!

1 vote
mauricio.groth
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.
November 30, 2022

Hi @Alexander Kraus

As you're on Jira Cloud, the correct answer is to get an app that provides JQL extensions you're looking for.

With standard JQL, you can only get a list of issues and export them to Excel for further processing. This works if you want to do a one-off analysis. If your use case is more dynamic than that, look beyond standard Jira.

Standard JQL doesn't easily allow it, but you can quickly find the results using our professional indexing service JQL Search Extensions

You can use this query to find your tasks that are children of epics whose program increment' = 'PI_3'

issue in childrenOfEpicsInQuery("'program increment' = 'PI_3'") and issuetype = task

Check out the documentation for more examples. 

If you have any other questions, please contact our support. We’ll be happy to help you!
Best regards,
Maurício

Suggest an answer

Log in or Sign up to answer