Sync Jira sub-tasks when a parent task is Exalated

Originally asked by Juan Galeano on 30 January 2020 (original question)


In order to save time, it would be great if I could only sync the parent task and in case sub-tasks are created inside, they are automatically sync to the destination Jira.

Is it possible?

I would really appreciate your help.

Thanks a lot.


Answer by Juan Grases on 30 January 2020

PermalinkEditDelete

Hello Juan,

You could go with this solution:

On your outgoing sync on the source Jira

httpClient.get("/rest/api/3/issue/"+issueKey.id).fields.subtasks?.collect{
    def subTaskKey = new com.exalate.basic.domain.BasicIssueKey(it.id, it.key)
   syncHelper.exalate(subTaskKey)
}
 

This should ensure that all subtasks get exalated when the parent issue is exalated. Of course also make sure that on the receiving side, you are properly syncing subtasks issues. Check this guide:

https://docs.idalko.com/exalate/display/ED/How+to+synchronize+tasks+and+subtasks

Best regards,
Juan


Comments:

Juan Galeano commented on 30 January 2020

That worked! Thanks a lot for you help and quick solution.

Answer by PATRICIA FRANCEZI on 14 March 2020

Instead of doing by outgoing, is it possible to trigger by rules?

I tried this solution, it worked, but every story will be sync when in outgoing sync.

but my trigger set the epic with jql for creating the sync, not all the issues would be auto sync


Comments:

Juan Grases commented on 14 March 2020

Hi!

With that approach every subtask of the parent task that was catch by the trigger will be synced, you still control which Parent task will be synced from the exalate trigger (which uses JQL).

If you also need to control which subtasks will be synced inside a parent task that was catch by the trigger, you can do it from the outgoing sync:

Outgoing sync

// Top of your outgoing sync
if(issue.type.name == "Sub-task" && issue.priority?.name == "Low"){
  return ; //You will ignore sub-tasks which priority is Low
}

Of course this is just an example, you could set any condition to decide when a subtask (or any issue) will be synced or not.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.