jira query: issues with linked issues

I need to find all of the issues in my project that have links to other issues, which might not be in the same project. I can't figure out the field name for the "have links to" part. Can anyone help me?

17 answers

1 accepted

Related, unresolved issue in Atlassian Jira project: https://jira.atlassian.com/browse/JRA-25640

So there is no way to do this without plugins?

Thanks for this, seems this functionality cant be met without plug-ins. Unfortunately, Installing plug-ins is currently not an option.

I also need to be able to do this without the Script Runner plug-in.

For me as well this is a must-have feature due to the abundance of simultaneous issues with and without blocks. Installing plug-ins is not an option.

This functionality is essential for me too, and i also don't have the option of installing plugins.

I could also use it. Why do I need a plugin for this - shouldn't issue link be searchable like all the other fields?

Same frustration here; no ability to add plug-ins due to network systems folks not supporting it. Why isn't this capability part of the functions list?

I can see the column in a JQL result page, but can't filter for it in JQL...?

+1 here that this should be default functionality. +1 as well for the inability for mere mortals like me to be able/allowed to install plug-ins.

I'm managing five backlogs with a lot of related issues on other boards. I need to be able to see what issues can be closed when closing a related issue on another board. That's almost impossible without queries.

I echo Eerk's comments almost word-for-word!

Even without the ability to drill down into link types, being able to query for any issue with a link would make a significant improvement to the current "nothing at all" capability.

This is such an essential function and will help JIRA community at large, why no one from Atlassian is responding to his thread?

The other piece that should be added is a column to show the link type in the filter results.

Agree with all the comments. This needs to be a searchable field like all the others. No plug in should be needed.

Agreed, This is basic functionality and should is in place.

I also agree with the comments.

Is there any JRA project issue to implement this? If not, how could we create it?

Thank you very much!

plugin is not needed.  Just go to Issue Navigator and put in the JQL query:

issue in linkedIssues(XXX-XX)

Philip that works for a specific issue, but I think the idea is to for example query only issue types that have a specific issuetype linked to it.....ie only stories with bugs linked.

+1   - I'll go farther and push for email events here as well.  Your goal is to provide the tools that foster the development of strong processes.  The inability to send emails when dependencies change status cripples the strength of any processes that need to manage dependencies.  I know - not this issue.  Just venting a bit.

I think this should be supported in a vanilla instalation. I guess this is  a standard use-case anybody can run into... so +1 from me ...

Agreed.  Such a basic query.  Find me all issues that are currently blocked by another issue.  How is this not part of the base install?  

+1  Unfortunately, JIRA without plugins is akin to using an iPhone without any apps.

I am completely stunned that this is not possible. D:

+1 I'm confused too that a product like Jira doesnot support something that I would consider basic functionality.

+ 1 - cannot believe JIRA does not support this 

+1 Agree.

This is a critical management functionality that should be covered by Jira. I neither understand why, besides of the Jira licence we have to pay an extra plug-in. Also take on mind cloud version has limit amount of functionality than the server version.

The issue for cloud JRACLOUD-25640 , doesn't have any updates.

@Philip Fung- Thank you!  Your tip helped me (find filtered list of all jiras associated with 1 specific jira).

issueFunction in linkedIssuesOf("issuetype = Bug and project = projectName")

This helped me resolve the issue.

How would you just get an additional parent of a particular ticket?

Your query would give all linked issue of a bug within a particular project. If we do that on our end, we end up too many tickets. 

You can narrow it down to results where the outbound link type is <link type> by doing:

issueFunction in linkedIssuesOf("issuetype = Bug and project = projectName", <link type>)

So you might replace <link type> with

"is parent of"

You can narrow the returned results further by whatever criteria you want with:

issueFunction in linkedIssuesOf("issuetype = Bug and project = projectName", <link type>) AND <additional criteria>

Is this the full JQL? I am not getting any relsults using it. And to clarify i am the site Admin so its not a permissions issue. All i am seeing is this:Capture.PNG

Somya Upadhyay - 

this worked!  issueFunction in linkedIssuesOf("issuetype = Bug and project = projectName") 

 

This allowed me to pull all Issues in a project with a linked issue 

Thank you!

I am on Jira 7.3 and here's the JQL statement I use to filter all the issues linked to some other issue(s):

 issue in linkedIssues("AAA-123")

That only provides the links to one issue which is of limited benefit

I'm looking for something like "show me all the bugs linked to all stories" so I can see what stories might be blocked

Using the blocking flag is really for an issue that isn't able to make progress at all and doesn't actually show me why it is blocked. The summary of the bug does.

Is there a feature request ticket about this, does anyone know? Does Atlassian follow these discussions at all?

This thread has been going for 5 years and Atlassians answer is use a plugin to resolve the issue.  

Then they anounce a new pricing structure.

I have a product manager that needs to track the dependancies and we have to jump through hoops to do this.

Been using JIRA for 11 years and this is a typical problem.  It takes them for ever to fix or improve small request like this because they use voting on everything. 

No answer but just adding to the Atlassian frustration.

1 vote

You don't need a plugin to do this.  JQL alone can do it.

To find issues which are duplicated:

project = <YOUR_PROJECT> and issueFunction in linkedIssuesOf("", "is duplicated by")

To find issues that duplicate another issue:

project = <YOUR_PROJECT> and issueFunction in linkedIssuesOf("", "duplicates")

To find BOTH issues that duplicate and issues that are duplicated:

project = <YOUR_PROJECT> and (issueFunction in linkedIssuesOf("", "is duplicated by") or issueFunction in linkedIssuesOf("", "duplicates"))

Hi there,

I think you really need a plug-in. I tried in cloud version and this was the result message:

Unable to find JQL function 'issueFunction'

Any plug-in available for cloud version?

Regards.

Hi Legna,

The ScriptRunner plug-in can enable the issueFunction capability in the cloud version. 

Please see:

https://community.atlassian.com/t5/Marketplace-Apps-questions/Substitute-for-issueFunction-in-JIRA-cloud/qaq-p/613278

Regards,

Brandon

To get issues with links, add this to your JQL:

issue in hasLinks()

(JIRA 7.2.4)

I cannot find this hasLinks() function in JIRA docuemntation or JIRA release notes: https://confluence.atlassian.com/jirasoftware/jira-software-7-2-x-release-notes-826896227.html

@ming Lam this command is from the plug in... 
+1 on needing this to be standard functionality! I used this all the time at my last job and didnt even realize it was a plug-in until I left and tried to use it in another instance

The problem with JQL Tricks "linkedIssuesInQuery()" solution is that every single issue needs to have the link type. It would be better if there were an option to have the link type applied at the epic level and have the query return the epic and all its constituent child issues and their subtasks.

For example, this filter:

(issue in parent("issue in linkedAllIssues(CH-58,\"contains the scope\")") OR issue in linkedAllIssues(CH-58, "contains the scope") OR issuekey = CH-58)

returns everything with a direct link to CH-58. But it fails to retrieve the child issues and subtasks belonging to those directly linked issues. I have not found a way to return the children of this result set.

It is not practical to link every single issue or subtask directly.

My company also is experiencing issue with linkedIssue. 

  issueFunction IN linkedIssueOf("key=TEST-111", "additional child of") returns rows as expected, say TEST-999. 

But doing the reverse query doesn't work, I was expecting that it should return TEST-111, but instead returns the following error:

   issueFunction IN linkedIssueOf("key=TEST-999", "additional parent of")

Error msg "Could not find any issue link type having either inward or outward description: additional parent of. Remove argument to search all link types. Available links are: [additional parent of , additional child of, Cloned from, Cloned to, duplicates, is duplicated by, is Epic of, has Epic, parent of, child of, Post-Mortem, Incident, depends on (deprecated), is depended on by (deprecated), causes, is caused by, relates to]"

 

Is anyone else experiencing this? How do we fix this? 

Thank you. 

 

 

 

I found a way to do this  by exporting the total list of issues into Excel, then filtering from there based on the linked field.  It's not pretty, and it's a pain in the a$$, but it gets it done.  I agree this should be native functionality in Jira thought, would be so much easier!

I was successful using the following JQL:

issueFunction in linkedIssuesOf("filter = 'FILTER 1'")

My filter (which I'm calling 'FILTER 1' for anonymity) is fairly complex - I used JQL to narrow down ProjectIssuetype = Roadmap, and createdDate.

Using this filter combined with the JQL above pulled up all the child issues (Stories, Tasks, Bugs, Epics) of Roadmap issuetypes created after a certain date in my project.

I think this should work as long as your filter is shared with logged-in users/public. However I'm not sure if this JQL works without the plugin. I'm relatively new to JIRA and thus am not quite familiar with which functions are native to JIRA and which ones aren't. 

I was successful using the following JQL:

issueFunction in linkedIssuesOf("filter = 'FILTER 1'")

My filter (which I'm calling 'FILTER 1' for anonymity) is fairly complex - I used JQL to narrow down ProjectIssuetype = Roadmap, and createdDate.

Using this filter combined with the JQL above pulled up all the child issues (Stories, Tasks, Bugs, Epics) of Roadmap issuetypes created after a certain date in my project.

I think this should work as long as your filter is shared with logged-in users/public. However I'm not sure if this JQL works without the plugin. I'm relatively new to JIRA and thus am not quite familiar with which functions are native to JIRA and which ones aren't. 

That is exactly what I am looking to do, but alas is does not work without the Plug In and the Plug In is not available on the Cloud versions.

I want to add another voice of annoyance to everyone else here, searching for issues that block the issues you are tracking and what type of link that may be (is dependant on, blocks, etc) is an essential feature. Even my old company that had an in house developed bug tracking software with an interface done in Adobe Air could bring up a search for all tickets that blocked or were dependant on other tickets. Shame Atlassian for not considering this (as it is stated in their Backlog that is no longer part of their roadmap: https://jira.atlassian.com/browse/JRACLOUD-22024)

Using the JQL "issue in hasLinks("")" works perfectly, but is there a way to get the one more step and to select the issues that have links .... that are resolved or not?

just add the criteria like this

issueFunction in hasLinks("relates to") and resolution is not EMPTY
0 vote

I figured the subject is the same so I'll post what I found as a result of this thread. 

In a very hacky way, I wanted to make swim lanes in my board that would display children hooked up to a parent using "is refined by" links. 

The description of the swim lane would contain the name and description of the parent. Then the JQL would be:

 

project = <project_name> and issuetype = Story AND issue in linkedIssues("JIRA-XX", "Is refined by") ORDER BY summary ASC

 

Worked a treat. Now every time a child is hooked up to a given parent using "is refined by" the board will update. 

I think you can see linked issues if you add the column in the filter view.  Build the view for your project and then click "columns" search for "Issue Link" and then re-arrange it to the appropriate spot in your filter view.  I've found this very helpful for keeping up with active work.

issue in linkedIssues("KEY-123")

0 vote

hey folks just found a solution that is a pretty quick way to get what you need without a plugin:

1) Search for the issues that you want to find out if they have dependencies (i.e. by Sprint, Status, etc)

2) Click on "Columns" and select Links

  - this display all the issues with Links (will include stories too but it's a good start)

3) Export CSV (with current columns)

  - this gives you an excel sheet that unfortunately includes each linked issue as a different column for each issue row record

4) In the last column create use the CountA(put range here) function and for the range start with the first column that contains linked issues and go to the end)

5) Filter the final column you just created and filter out the rows with 0 linked issues.

It's not perfect but it's a very quick way to scan through a large set of issues.  Alternatively you can just scroll through the JIRA search results using the added "Links" column to see if any stories have Linked issues.

Hey everyone, I was able to more or less pull this off via this:

project=MY-PROJECT <AND other things you might want> AND linkedIssue != ABC-123

Just choose your project and some other linked issue you don't care about. In my case would have been referring to the very first ever linked issue which was before my project even existed.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jun 14, 2018 in Jira Service Desk

How the Telegram Integration for Jira helps Sergey's team take their support efficiency to the bank

...+ reading Fantasy). The same is true for him at the bank he works for: Efficiency is key when time literally equals money. Read on to learn how Sergey makes most of the time he has by...

491 views 2 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you