Using linkedIssuesOf for multiple Jira spaces

Brad Harrold January 7, 2021

I'm trying to use linkedIssuesOf to search for issues that are linked to a project contained in another Jira space. We have two spaces, one internal only and one for interfacing with customers. We are able to link issues between the two spaces such as "relates to".

The following code works since the project referenced is contained within the same space as the search:

issueFunction in linkedIssuesOf( "project = GTSE")

However, I receive the error, "The value 'OOB' does not exist for the field 'project'." when searching for "project = OOB" since that project is contained in a different Jira space. Any thoughts would be greatly appreciated.

1 answer

1 accepted

1 vote
Answer accepted
Radek Dostál
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.
January 7, 2021

If by "Jira space" you mean 2 entirely different instances, each on a different URL, then you will not be able to use JQL / Issue Search across them. It just won't work, Issue Search only runs on the same instance you execute it from.

 

Workaround may be if you fetch the remote issue links per issue in their json format (or through Java API), and then do a regular expression check on them to figure out whether they are linked to an issue from the other instance, and whether they are linked to a specific project.

In any case, none of which is available to do through Issue Search.

Radek Dostál
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.
January 7, 2021

Aaaah but ScriptRunner has a nice function that can do this: https://scriptrunner.adaptavist.com/6.16.0/jira/jql-functions.html#_remote_issue_links

 

Works for me when trying this out with like

project = MYPROJ and issueFunction in linkedIssuesOfRemote("https://another.instance.com/browse/PROJKEY-*")

Like Brad Harrold likes this
Brad Harrold January 7, 2021

You sir, deserve a promotion. Worked perfectly. Much thanks!

Suggest an answer

Log in or Sign up to answer