Forums

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

Retrieve only linked issues from another project

Prashant B February 24, 2021

Hello,

I have the following set up

Project 1 - 10 jira issues ( My project)

Project 2 - 1000 Jira issues

We create a relates to links from issues in Project 1 -> Project 2

Project 2 has many internal links between issues which I don't care. I only want to retrieve the issues in Project 2 that are linked to issues in project 1 and display it in a confluence table.

 

currently, i have to use the following two queries which retrieve quite a lot of unwanted issues of project 2 and then as a second step see which are linked to Project 1 issues.

Query 1:  issueLinkType = "relates to" AND (project="Project 1" OR project = "Project 2") <-- gives 1000 issues

Query 2: project = "Project 1" and issuetype = "PI Objective"  <---  returns the 10 Issues created

 

Following this I merge the two tables using a vlookup. which then gets only the entries i need. I need to optimize query 1 just to retrieve the issues that has a "relates to" relationship with the issues in Project 2

Is there a JQL query that I could use just to retrieve the 10 or more linked issues from Project 2.

 

Thanks in advance for your proposals

1 answer

1 accepted

1 vote
Answer accepted
Prashant B February 25, 2021

I finally found the answer to this.

 

issueFunction in linkedIssuesOf("project = Project 1")

 

This lists all the issues .. only the ones linked to the issues of project 1, so it reduced the time by 10 times instead of retrieving 1000 issues.

Emily Thraen
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!
May 24, 2022

Are you using a plugin? I can't get that query to work. 

Guy H Robinson
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!
July 8, 2022

Doesn't work for me either. Why was this accepted?

Martin Ferreira July 12, 2022

I believe he is using a JQL function from the scriptrunner plugin: linkedIssuesOf 

Suggest an answer

Log in or Sign up to answer