Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

"Blockers" Issue links

Mary Coakley July 13, 2022

How can I query out issues that have blockers and also potentially the issues that are linked as a blocker?

 

thank you

1 answer

3 votes
Florian Bonniec
Community Champion
July 13, 2022

Hi

 

You cannot do it with JIRA vanilla, you are limited to only query issue linked to a specific issue using linkedIssues().

https://confluence.atlassian.com/jirasoftwareserver/advanced-searching-functions-reference-939938746.html#Advancedsearchingfunctionsreference-linkedIssueslinkedIssues()

 

But you can do it with 3rd party app such as Scriptrunner.

https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_linkedissuesof

 

I'm not familliar with JQL Trciks but this app may also do what you want.

https://www.j-tricks.com/jqlt-links-functions.html

Mary Coakley July 18, 2022

But this is all JQL-I'm looking for SQL. 

Florian Bonniec
Community Champion
July 18, 2022

This SQL should works or close to

 

select CONCAT(projectsource.pkey,'-',source.issuenum) as IssueSource, issuelinktype.OUTWARD ,CONCAT(projectdestination.pkey,'-',destination.issuenum) as IssueDestination from issuelink
left join issuelinktype on issuelink.id = issuelinktype.id
left join jiraissue destination on issuelink.destination = destination.id
left join jiraissue source on issuelink.source = source.id
left join project projectdestination on projectdestination.id = destination.project
left join project projectsource on projectsource.id = source.project
where linkname = 'Blocks'

Suggest an answer

Log in or Sign up to answer