Sync Epic ticket id as Taks's parent

Originally asked by sapir monza on 13 January 2020 (original question)


Hi,

We are using Exalate for our Jira server. The sync is between two projects in the same instance.

When opening an epic ticket in project A we would like that a task ticket will be opened in project B and that ticket will get the epic ticket number as a parent (epic link)

Is it possible? if so, how?

ThanksSource: Jira Server/Datacenter (old community)


Answer by Francis Martens (Exalate) on 13 January 2020

So - if I understand it well.

The intention is that when an epic is created, a task is automatically added to the epic.

This should be straightforward - I didn’t try the following code - but it should be something like

if (firstSync and replica.type?.name == "Epic") {
   issue.projectKey = "B"
   issue.typeName = "Task"

   ...
   issue.customFields."Epic Link".value = replica.key
   ...

}