JQL to get bugs linked to stories linked to an epic ;)

Doug Varn June 5, 2014

Is there a way to do this? I want a filter that gets me the Bugs linked to all the Stories linked to a certain Epic.

8 answers

1 accepted

0 votes
Answer accepted
Udo Brand
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.
June 6, 2014

You can combine those in following way:

1. create a filter that shows the stories linked to your epic (filter1)

issueFunction in linkedIssuesOf("issue = SMC-242", "is Epic of") and issuetype = Story

2. create a second filter that uses filter1:

issuetype=Bug AND status != Done AND issueFunction in linkedIssuesOf("filter = filter1", "<YourLinkType>")

Doug Varn June 9, 2014

Thanks for the tip. Sadly, linkedIssuesOf requires the second param, and my QA people have used different link types at random, so it's not going to be practical for me to look up the bugs this way without having them clean things up first.

Wish it could find by any old link type!

JamieA
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.
July 8, 2014

The next version won't require the second param, in which case it means: work across all link types

Udo Brand
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.
July 8, 2014

Ah, that are good news. Thanks Jamie!

2 votes
JamieA
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.
July 29, 2014
1 vote
Jose M.
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.
July 2, 2014
It is definetily not easy to perform a filter covering all needs. I am looking for an easy way to find all Epics, Stories and other issue types, inclusive their sub-tasks.
The following helps a little:
"Epic Link" = ... OR "Epic Link" = ... OR parent in (..., ..., ..., ...) ORDER BY "Epic Name" ASC
0 votes
Emna BEN BRAHIM May 5, 2017

Hello ,

Probably this could Help:

issue in linkedIssues(parentid, parent-of)

in the parent id just put the id of the epic . it will bring all the issues that are under the given epic id 

then filter on issuetype bug.

thanks, 

Emna 

 

0 votes
Vijay Khacharia
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.
July 3, 2014

Hi,

This plugin provides the possiblity to search the issues by links of all types. It is paid though not so expensive.

https://marketplace.atlassian.com/plugins/org.craftforge.jira.craftforge-jql-functions-plugin

I have used both the plugins, only advantage I see with Craftware plugin is the need of getting parent issues of all the linked tasks.

Vijay.

0 votes
Doug Varn June 6, 2014

Ok, maybe I'll find it. I haven't nested queries before, so maybe that's partly my problem.

I can get all bugs linked to a story with:

issuetype=Bug AND status != Done AND issue IN (linkedIssues("SMC-390"))

And get all stories linked to an epic with:

issueFunction in linkedIssuesOf("issue = SMC-242", "is Epic of") and issuetype = Story

But I can't seem to combine the two.

0 votes
JamieA
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.
June 5, 2014

There was a question on this recently, but I can't find it. You need to the nest the query. Maybe try from the perspective of the bug, and use the filter query to find stories then epics. This is certainly possible.

0 votes
Doug Varn June 5, 2014

This gives me the issues (all types, not just Stories) linked to a particular epic:

issueFunction in linkedIssuesOf("issue = SMC-226", "is Epic of")

But how to now get a list of bugs linked to all those...

Suggest an answer

Log in or Sign up to answer