Forums

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

Scriptrunner - Finding linked issues within a separate Jira

DFernow
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 20, 2020

I am using the following code:

import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.link.IssueLinkManager;

def issueManager = ComponentAccessor.getIssueManager()
def issueObject = issueManager.getIssueObject("VS-17145")

def linkManager = ComponentAccessor.getIssueLinkManager()

def jsdIssueLinkManager = ComponentAccessor.getComponent(IssueLinkManager)

log.debug(linkManager.getInwardLinks(issueObject.id))
log.debug(linkManager.getOutwardLinks(issueObject.id))


This code currently only gives me linked issues within the Jira instance the current issue is a part of. If one of the issues linked is a part of a different Jira instance, it is not retrieved. Is there a way to fix this?

1 answer

1 accepted

0 votes
Answer accepted
John Chin
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.
March 30, 2020

Hi Daniel,

You can probably use RemoteIssueLinkManager  API to get the remote link issue. For more code samples, you can refer to our library.

I hope this helps!

Kind regards,
John Chin

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events