Originally asked by Harold Oconitrillo on 09 May 2023 (original question)
Hi,
Could you please let us know how to syn only Subtask from Data center to Cloud Instance?
Greetings.
Originally asked by Harold Oconitrillo on 09 May 2023 (original question)
Hi,
Could you please let us know how to syn only Subtask from Data center to Cloud Instance?
Greetings.
Answer by Syed Majid Hassan on 17 May 2023
From Data Center, send the parentId i.e.:
replica.parentId = issue.parentId
In the Cloud incoming,
if(firstSync && replica.parentId){ issue.typeName = "Sub-task"
def localParent = nodeHelper.getLocalIssueFromRemoteId(replica.parentId.toLong()) if(localParent){
issue.parentId = localParent.id
}
else {
throw new com.exalate.api.exception.IssueTrackerException("Subtask cannot be created: parent issue with remote id " + replica.parentId + " was not found. Please make sure the parent issue is synchronized before resolving this error" )
}
}
You can find documentation here:
https://docs.exalate.com/docs/how-to-sync-tasks-and-subtasks-in-jira-cloud
https://docs.exalate.com/docs/how-to-sync-tasks-and-subtasks-in-jira-on-premise
And the following post/video might be useful as well:
Jira Cloud ServiceNow: Maintaining Issue Hierarchy (old community)
Even though one of the systems involved here is ServiceNow, I believe the underlying concepts stay in tact.
Please note that for this all to work, the parent of the subtask must have been synced already. Otherwise you will receive an error on the destination side. Jira would not allow a subtask to be created without the parent being present.
Thanks
Majid