Show list of linked issues from a number of issues

Jonathan Kernan December 18, 2014

Hi there,

I am using JIRA 6.3 and have a question regarding JQL Queries.

Is it possible to build upon this query :

issue in linkedIssues(ABC-123)

which displays all the issues linked to a single issue? 

What I would like to do is essentially pass in mutiple issue keys instead of one which are based on a separate query. So, what im looking for is something like :

issue in linkedIssues(<subquery>)

Can this be done somehow?

 

 

5 answers

1 accepted

7 votes
Answer accepted
Jonathan Kernan December 18, 2014

Created a filter to retrieve a list of issues containing issue links and called this X. 

Used this filter to get all linked issues and filtered out like this: 

issuefunction in linkedIssuesOf('filter = X') AND issuetype in (Bug)

I did'nt realise you could supply the linkedIssueOf() function with a filter until now.

 

Thank you all for the help.

Naomi Perez March 10, 2021

issuefunction is not a variable that I'm seeing available.

Michal Karpinski May 17, 2021

This can be simplifies to

issueFunction in linkedIssuesOf("issue =TICKETID-1")
8 votes
Peter Bengov
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 18, 2014

Yes, this is possible if Script Runner is installed. You can use something like

issueFunction in linkedIssuesOf("status = Open", "blocks") and resolution is empty

This is like issueFunction in linkedIssuesOf(<subquery>,<link type>) and <more filtering of the results> 

See more info here: https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+JQL+Functions#ScriptedJQLFunctions-IssueLinks

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.
December 18, 2014

The second argument is optional, if omitted it will show issues linked with any link type.

Jonathan Kernan December 18, 2014

So I have a list of issues of type "Improvement" and want to find all issues linked of type "Bug" Can I combine the default JQL with scriptrunner functions like this: issuetype = Improvement AND fixVersion = X AND project in (A,B,C) AND issueFunction in linkedIssuesOf("issuetype = Bug")

Peter Bengov
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 18, 2014

You can. Just make sure that if you are using linkedIssuesOf you specify link type (inward or outward). Possible values are: blocks, is blocked by, clones, is cloned by, duplicates, is duplicated by, is Epic of, has Epic, relates to.

Jonathan Kernan December 18, 2014

Hi Peter, I don't really care about the link type. I want to get all linked issues like Jamie mentioned above. Just need to make sure i'm selecting issues of type "Improvement" and within these, get all issuslinks of type "Bug" only.

Jonathan Kernan December 18, 2014

I have a filter called 'JK' getting all issues for a certain fix version and issue type and stored this in a filter. Something like this: issuefunction in subtasksOf("filter = 'JK'") and issuetype in ("Bug") subtasksOf(filter) looks at all the sub-tasks as opposed to the issues linked to a certain issue. It would be ideal if I could return all linked issues based on a filter.

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.
December 19, 2014

issueFunction in linkedIssuesOf('filter = "JK"') and issuetype = "Bug" ?

Like Alexey Kir likes this
Narasimha murthy May 16, 2019

is there any work around for the query to "get the list of issues which has linked issues" with out using issuefunction ?

Like # people like this
7 votes
Mike Doolittle February 13, 2019

Not to resurrect and old thread, but this might be a good solution for people still searching:

criteria=mycriteria and issueLinkType is not empty 

This should produce a list of issues that meet mycriteria that *are* linked to other issues.

Sayantan Pal April 4, 2019

Is “criteria” a JQL syntax?

Like aaron spellen likes this
Matt May 8, 2019

Thanks Mike, that's super useful!  Glad I scrolled to the bottom of this question.

Like aaron spellen likes this
Ashish Sharma September 8, 2020

Sadly issueLinkType doesn't support is not operator, and i think it never has.

Vanessa McGonigle September 17, 2020

@Ashish Sharma maybe try issueLinkType not in ()

Ashish Sharma September 17, 2020

@Vanessa McGonigle Won't it show issues without any linking also? Can you share full query which you tried?

Like Lisa Napier likes this
Vanessa McGonigle September 18, 2020

It seems the query I used for my own jira instance allows issueLinkType is not EMPTY


Maybe atlassian updated the function?

2 votes
Fernando Llaca Romero March 4, 2017

Hi ,

You can try a free plugin I've made: Easy Links for JIRA. It provides two new custom field types: Single Issue Link Picker and Multiple Issue Link Picker. These custom fields are displayed as dropdown select lists, which you can filter and autocomplete by typing on it (see screenshots). Also, you can configure the customfields to restrict the available issues to select (using a JQL expression when creating the custom field), and the link type that the field will be associated to. When you select a value, a new issue link is created between the current issue and the selected one(s), that you can manage as a regular issue link.

In addition, you can use the custom field in JQL queries (for example: "Blocking Task" = TEST-123), and in dashboard gadgets (pie charts, filters, etc).

I hope it can solve your issue,

greetings!

0 votes
Shahrukh Khan September 25, 2019

How can I get the list of tickets which have some linked issues?

Narasimha murthy September 25, 2019

As Answered by Peter B , its like this issueFunction in linkedIssuesOf(<subquery>,<link type>) and <more filtering of the results> 

Eg : 

issueFunction in linkedIssuesOf("status = Open", "blocks") and resolution is empty

Suggest an answer

Log in or Sign up to answer