This resource represents remote issue links, a way of linking Jira to information in other systems. Use it to get, create, update, and delete remote issue links either by ID or global ID. The global ID provides a way of accessing remote issue links using information about the item's remote system host and remote system identifier.
To checkout the Remote Links for your Jira Issue, you may try this endpoint.
https://{yourInstance}.atlassian.net/rest/api/3/issue/{issue-key}/remotelink
To implement this in Exalate, make a connection and then you can edit your scripts as per the below configuration.
Step 1)
For sending the Web-Links from source, you need to add this on your source outgoing sync
String key = issue.key
def res = httpClient.get("/rest/api/latest/issue/"+"$key"+"/remotelink")
def result = ("${res.object}")
replica."Remote Links" = result
Step 2)
To receive the Web-Links on the target, you need to use the replica object, and also use the POST API to create the Web-Links on the target issue.
if(firstSync){
issue.projectKey = "TP"
// Set type name from source issue, if not found set a default
issue.typeName = nodeHelper.getIssueType(replica.type?.name, issue.projectKey)?.name ?: "Task"
issue.summary = replica.summary
store(issue)
}
issue.summary = replica.summary
issue.description = replica.description
issue.comments = commentHelper.mergeComments(issue, replica)
issue.attachments = attachmentHelper.mergeAttachments(issue, replica)
issue.labels = replica.labels
for(int i=0; i<=replica."Remote Links".values[0].url.size(); i++)
{
httpClient.post("/rest/api/3/issue/${issue.key}/remotelink", """
{
"globalId": "${issue.key+i}",
"object": {
"url": "${replica."Remote Links".values[0].url[i]}",
"title": "${replica."Remote Links".values[0].title[i]}"
}
}
""")
}
Note : Please make sure to use the store(issue) in the firstSync block and include any mandatory fields which are required to create the issue on the target.
Also checkout the below video for a detailed explanation of the same!
Yours sincerely,
Exalate Team