Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

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

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!


2 answers

2 accepted

0 votes
Answer accepted
Robert Wen Community Leader Dec 03, 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>)

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

However, it will pull everything and not just bugs. 

Robert Wen Community Leader Dec 03, 2021


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

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 and @Joseph Hani .

0 votes
Answer accepted

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 ;) 

Thank you so much! 

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

Thanks a ton!

Like Joseph Hani likes this

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events