We sync issues between Jira Software 10.3.6 and Jira Service Management 10.3.6 using Exalate 5.28.1-java17-j10
When an user archive an issue with a remote link, the Exalate support recommend us to disconnect both issues BEFORE archiving. But the users doesn’t has permission to unexalate remote links. So, in order to avoid future errors, we must find a way to DELETE a remote link when an issue is archived. I programed a listener using ScriptRunner that executes in the “Issue Archived” event. The listener then executes a code, and the remote link dissapear from the archived issue, but not from the remote issue. The code is the following:
Great question! You’re on the right track with your ScriptRunner listener for the “Issue Archived” event, but as you’ve noticed, deleting the local twin trace only removes the remote link from the archived issue—not from the remote (counterpart) issue.
To fully disconnect both issues and remove the remote links on both sides, you need to ensure that the disconnection is performed bi-directionally. Exalate’s recommended approach is to use the “Unexalate” (disconnect) operation, which safely removes the sync relationship and remote links from both issues. However, this operation typically requires user permissions.
Since your users don’t have permission to unexalate, and you want to automate this via a listener, you’ll need to trigger the disconnect operation programmatically on both sides. Unfortunately, directly deleting the twin trace only affects the local side and doesn’t notify the remote instance to clean up its link.
Here’s what you should consider:
The Exalate REST API provides a way to disconnect issues programmatically. You can call the Disconnect Issue API to remove the sync and remote links from both sides.
You’ll need to call this API from your listener, passing the local issue key or ID. This will ensure both issues are properly disconnected and all remote links are removed.
Example approach:
In your ScriptRunner listener, when the “Issue Archived” event fires, make an HTTP POST request to the Exalate REST API endpoint for disconnecting the issue.
The API will handle the cleanup on both the local and remote issues.