Syncing Parent-Task before Sub-Task

Originally asked by Jillani Fazal on 06 January 2023 (original question)


We would like to make sure that when syncing a sub-task the parent task is always synced before that.

For doing that we added the following code to the outgoing instance:

โ€“

//Sync parent task
if(issue.parentId){
def parentTask = httpClient.get(โ€œ/rest/api/3/issue/โ€+issue.key).fields.parent

def parentTaskKey = new com.exalate.basic.domain.BasicIssueKey(parentTask.id, parentTask.key)
syncHelper.exalate(parentTaskKey)
}

Is this the right way to do it?

The documentation you describes this flow:

โ€œSyncing Subtasks Automatically after Syncing Parent Task (Jira Cloud)โ€

What we would need is this:
โ€œSyncing Parent Task Automatically when Syncing Subtask (Jira Cloud)โ€

Is it possible?

(posting on behalf of the client)