Forums

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

Need a Jira JQL Query to find the linked issues

Asmath Basha
Contributor
January 13, 2025

Need a Jira JQL Query to find the linked issues in the whole project tickets. Kindly help on this.

4 answers

1 accepted

3 votes
Answer accepted
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 13, 2025

Hi Asmath,

If you have either of the ScriptRunner for Jira Cloud or the Enhanced Search for Jira plugins installed, then the linkedIssuesOf() JQL function can help to achieve your requirement.

Regards,

Kristian

Asmath Basha
Contributor
January 15, 2025

Hi @Kristian Walker _Adaptavist_ , will check in Scriptrunner also. linkedIssuesOf() function will support in Jira cloud?

Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2025

Hi Asmath,

Yes linkedIssuesOf() will work in Jira Cloud and the docs linked above are for Jira Cloud.

In Jira Cloud you write the queries on the Enhanced Search page instead of in the main Jira search bar.

Regards,

Kristian

Asmath Basha
Contributor
January 21, 2025

Hi @Kristian Walker _Adaptavist_ , Can you send me the example JQL Query to achieve this using Enhanced search for Jira.

Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2025

Hi @Asmath Basha 

Enhanced Search is part of scriptrunner for Jira Cloud and can be accessed via the apps menu.

There is more information on this page.

Capture.PNG

Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2025

Hi Asmath,

I would advise checking the examples in the documentation page here and trying to modify these to create the query you require.

If you need further help, then please raise a support request here and our support team can help you to create the query that you require.

Regards,

Kristian

Asmath Basha
Contributor
January 22, 2025

Hi @Charlie Misonne , @Kristian Walker _Adaptavist_ thanks for your reply.

I need to filter the tickets like this query :

project = "TEST" AND status not in (Closed, Done) AND issueFunction in linkedIssuesOfRemote("TP-2") and status in (Resolved, Closed)

 

JQLQuery.pngHere the Project "TEST" is from Jira cloud instance and the linked issue is from different instance (data center).

Can we get the JQL Query to filter the tickets.

Jorge Guerreiro
Contributor
January 22, 2025

Hi @Asmath Basha 

You're correct that this specific query presents some challenges


AND issueFunction in linkedIssuesOfRemote("TP-2"): It gets a bit tricky here. The linkedIssuesOfRemote function is typically used to find issues linked to issues in a different project within the same Jira instance. It's not designed to work across separate Jira instances (Cloud and Data Center).

You're right that this exact query is not possible using Enhanced Search or standard JQL, primarily. You can't directly query issues from one Jira instance (Cloud) based on links to issues in another instance (Data Center) using standard JQL.

Like Charlie Misonne likes this
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2025

Hi Asmath,

In Jira cloud, you cannot search for remote linked issues as the linkedIssuesOfRemote JQL function is not provided in the cloud version. 

You can see a full list of what JQL functions from the on-premise versions are available in the cloud version on the documentation page located here.

I hope this helps.

Regards,

Kristian

Like Charlie Misonne likes this
Asmath Basha
Contributor
January 22, 2025

Hi @Kristian Walker _Adaptavist_ , @Jorge Guerreiro @Charlie Misonne @Manoj Gangwar thanks for your clarification and the workaround done for this issue.
Thanks again

Regards,
Asmath

Like # people like this
3 votes
Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 13, 2025

Hi @Asmath Basha 

 

To find all the issues with linked issues in a Jira project, you can use the following JQL query:

 project = "YOUR_PROJECT_KEY" AND issueLinkType IS NOT EMPTY

 If you want to filter by specific link types (like "blocks," "is blocked by," "relates to"), you can include the issueLinkType with a specific value, like:

project = "YOUR_PROJECT_KEY" AND issueLinkType = "blocks"

 

Asmath Basha
Contributor
January 13, 2025

Hi @Manoj Gangwar thanks for your reply.

  • Can we get query for resolved/Closed linked issues. Instead of seeing the Parent tickets, can we get the list of linked issues directly.
  • Normally we can export the Linked issues field and can get the list but here the linked issues are from different project. So in the linked issues field the issues won't visible in the filter.
  • Any idea on this.
Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 13, 2025

Hi @Asmath Basha 

In this scenario, I would you to to follow the suggestion provided by Charlie. 

key IN (ISSUE-1, ISSUE-2, ISSUE-3, ...) AND statusCategory = Done

If there are too many linked issues to manually input then use the addons like Scriptrunner or JQL search extension.

Like Charlie Misonne likes this
Asmath Basha
Contributor
January 13, 2025

Hi @Manoj Gangwar , thanks for the clarification. 

1 vote
Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 13, 2025

Hi @Asmath Basha 

By that you mean all the items having any issue link in a certain project?

By default Jira does not have many JQL functions to query for linked issues.

You can do:

  • linkedissue = ABC-123
    To find items linked to ABC-123
  • issue in linkedIssues(ABC-123,"is duplicated by")
    to find items linked to ABC-123 with the is duplicated by link type

More on https://support.atlassian.com/jira-service-management-cloud/docs/jql-functions/#linkedissue

 

I usually use scriptrunner which provides this function:

project = ABC and issuefunction in haslinks()

UPDATE:

nevermind my answer. Manoj provided a better solution.

 

Asmath Basha
Contributor
January 15, 2025

Hi @Charlie Misonne  thanks for the clarification.

0 votes
Hannes Obweger - JXL for Jira
Atlassian Partner
January 13, 2025

Hi @Asmath Basha

if you're open to solutions from the Atlassian Marketplace, you may want to have a look at the app that my team and I are working on: JXL for Jira.

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a number of advanced features, including support for (configurable) issue hierarchies. These issue hierarchies can be based on Jira's built-in parent/child relationships (like task/sub-task, or epic/story), and/or based on issue links of configurable issue link types. Once you've set up your hierarchy, you can use JXL's various search and filtering techniques to narrow down to the issues you're interested in, like so:

issue-link-filtering-v4.gif

There's a few things going on here - happy to elaborate if that's a direction that might be of interest to you. I should also add that issue hierarchies also play well with JXL's other advanced features, such as sum-ups, conditional formatting, or inline bulk editing via copy/paste.

Any questions just let me know,

Best,

Hannes

Prateek Charan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 18, 2025

Lets all merge 

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events