We have an active sync from Jira cloud to Jira cloud (Different Atlassian organizations). We have separate connections for the parent sync (Feature) and child sync (Defect).
On the local site the parent issuetype is called “Feature” and the child is of type “Defect”. On the remote site the parent issuetype is called “Life Change Request” and child issuetype is “Bug”
We would like to make the parent\child relationships as created in local site also visible on the remote site.
Parent child relationships are established via OOtB Parent field in Jira
Following the documentation we extended the outgoing local script and incomming script on remote site for the Defect connection? Syncing Epics in Jira | Exalate Docs?
In outgoing script I’ve add: have added Epic.send()
In the incomming script on remote site Epic.receive()
For testing purposes I created local parent= PVA-79287 with child= PVA-49712. Both issues are synchronised and created on the remote site. Remote Parent issue = APGSAND-2035, remote child issue = APGSAND-2034
Unfortunately the hierarchy is not established on the remote site!!
To sync parent-child relationships between different Jira Cloud instances using Exalate, you need to ensure that the relationship data (like the parent field or Epic Link) is correctly sent from the source and received/applied on the destination. Based on your description, it looks like the parent-child link isn’t being established on the remote side, even though both issues are created.
Here’s what you should check and adjust:
Outgoing Sync Script (Source/Local):
You mentioned using Epic.send() in your outgoing sync script. This is typically used for syncing Epic relationships, but if your parent-child relationship is not based on Epics (for example, using the standard Jira parent field for sub-tasks or other issue links), you may need to explicitly send the parent information.
For standard parent-child (not Epic), you might need to add logic to send the parent key or ID in the replica, for example:
if (issue.parent) {
replica.customKeys['parentKey'] = issue.parent.key
}
Incoming Sync Script (Destination/Remote):
On the remote side, you need to receive this information and set the parent relationship accordingly. For example:
if (replica.customKeys['parentKey']) {
issue.parent = nodeHelper.getIssue(replica.customKeys['parentKey'])
}
Make sure the parent issue is already created on the remote side before the child tries to link to it.
Order of Synchronization:
The parent issue should be synchronized and created on the remote side before the child issue tries to establish the relationship. If the child syncs first, it won’t find the parent to link to.
Custom Field Mapping:
If you’re using custom fields (like Epic Link or other custom parent fields), ensure the field IDs and names match between the two Jira instances, or handle the mapping in your scripts.
Script Mode vs. Visual Mode:
Since you’re using Script mode, you have full control over what data is sent and received. Double-check that the scripts on both sides are correctly handling the parent-child data.
Documentation Reference:
The documentation for syncing Epics in Jira Cloud is a good starting point: Syncing Epics in Jira | Exalate Docs. However, for non-Epic parent-child relationships, you may need to adapt the scripts as described above.
Summary:
You likely need to enhance your sync scripts to explicitly send and receive the parent issue key or ID, and then set the parent on the remote side. Double-check the order of synchronization and ensure the parent exists before the child tries to link to it.
For more details and script examples, see the official documentation:
If you need help with the exact script, let me know the specific parent-child relationship type (Epic, sub-task, or custom link), and I can provide a tailored example.