Details
-
Suggestion
-
Resolution: Won't Fix
-
None
-
None
-
1
-
1
-
Description
Problem:
Let's say we have two instances federated and I have issue links from one instance (A) to another instance (B).
issue 1a of instance A links to issue 1b of instance B and there is a reciprocal link
when I export issue 1a to instance b, it doesn't respect the remote links, especially if I export 1b back to instance a
it would be nice if Jira included the base URL of the federated issue link and then made some logical choices to add them during project or CSV import
Workaround:
The API referenced is here:
This step will performed after the project has been imported in the target source:
https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-getRemoteIssueLinks
Basically we'd do a simple get from the source for all the issues in a project:
GET URLOFSOURCE/rest/api/2/issue/{issueIdOrKey}/remotelink
{ "id": 10001, "self": "http://10.125.88.109:8080/jira730/rest/api/2/issue/KRIS-11/remotelink/10001", "application": {}, "object": { "url": "https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-getRemoteIssueLinks", "title": "test", "icon": { "url16x16": "https://docs.atlassian.com/favicon.ico" }, "status": { "icon": {} } } }
All you need to do is change the URL to the target instance and the call to a post, the JSON doesn't need to be reformated
POST /rest/api/2/issue/{issueIdOrKey}/remotelink
{ "id": 10001, "self": "http://10.125.88.109:8080/jira730/rest/api/2/issue/KRIS-11/remotelink/10001", "application": {}, "object": { "url": "https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-getRemoteIssueLinks", "title": "test", "icon": { "url16x16": "https://docs.atlassian.com/favicon.ico" }, "status": { "icon": {} } } }