Need help with JQL: Looking for a list of Stories where only bugs have been linked to

Diana Leon December 3, 2021

I need help with JQL. I am not a programmer. I do not have access to the backend to configure JIRA. 

I am looking for a way to pull Stories with linked Bugs only. 

sample: project = <my project> AND issuetype = Story AND status = Accepted

I have a column Links, however, it shows me everything that is linked but I only want to get a list with bugs. 

If there is no way to do this with JQL filter, can it be done in Project Automation where it can send the report with all Stories linked to bugs once a week? 

Thank you!

Diana 

2 answers

2 accepted

0 votes
Answer accepted
Robert Wen_ReleaseTEAM_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 3, 2021

Hello @Diana Leon !

The closest I can come to what you want is this (using OOTB JQL):

project = <my project> AND issue type = Story AND issueLinkType = "is blocked by"

This will only work if you consistently set up this link relationship to your Bugs.  If not, the following variation may help:

project = <my project> AND issue type = Story AND issueLinkType in ( "is blocked by", <other link relationships>)
Diana Leon December 3, 2021

Hi Robert. Let me try your solution. Thank you!

However, it will pull everything and not just bugs. 

Robert Wen_ReleaseTEAM_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 3, 2021

Diana,

You are correct.  it will pull all issues of any type that has that link relationship.

@Joseph Hani may have the better solution, but it will require an app like ScriptRunner.

Like Diana Leon likes this
Diana Leon December 3, 2021

We do not have ScriptRunner. I doubt it will be allowed to enable in our JIRA. Thank you so much for all your help @Robert Wen_ReleaseTEAM_ and @Joseph Hani .

0 votes
Answer accepted
Joseph Hani
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.
December 3, 2021

Hello @Diana Leon ,

If I remember correctly this is not possible with Standard feature of Jira. You will need and extension to do this. Like ScriptRunner or JQL Search Extension for Jira 

Actually the only thing you could get is the issue link from a specific IssueType, for example : 

issue in linkedIssues("TYPI-35")

 

If you have admin rights, and have managed to put all your bug inside a reference like "related to", "approve by", blocks, cloned by, ... (you can check you reference if you are Admin, go to Issues --> under Issue Features --> Issue linking)

Something like this could be useful : 

issue in linkedIssues("TYPI-345", blocks)

 

I would suggest also to try something like this with multiple ticket, but probably need more permissions to do it : 

issueFunction in linkedIssueOf("issue in (TYPI-30802,TYPI-31247,TYPI-30292,TYPI-31270)") AND type in (bug)

 

 

Using an app you could have use something like this , but not working on Standard sorry :/ 

type = Bug AND issue IN linkedIssuesOf("type = Story") 

 

Good luck ;) 

Diana Leon December 3, 2021

Thank you so much! 

Diana Leon December 3, 2021

It worked. I have tried: project = <my project> AND issuetype = Bug AND issueFunction in linkedIssuesOf("Type = Story")

Thanks a ton!

Like # people like this

Suggest an answer

Log in or Sign up to answer