Set a static epic link in Jira cloud

Originally asked by Jonathan Gilbert on 25 June 2021 (original question)


Hi, I wish to set a static/default Epic link in Jira cloud, from ServiceNow. I do not wish to sync all the Epics into ServiceNow. I can see there is documentation on how to do this for Jira “on prem”. I have tried using the same script line as shown on the on prem and it does not work


Answer by Francis Martens (Exalate) on 26 June 2021

Hi Jonathan Gilbert

Rephrasing your question
On an incoming sync - Jira Cloud side - issues need to be added to one specific epic

Is this correct?


Comments:

Jonathan Gilbert commented on 29 June 2021

Morning Francis

Yes you are correct

Francis Martens (Exalate) commented on 04 July 2021

Just do on the incoming sync

if(firstSync){
   issue.projectKey   = "PAR"
   issue.typeName     = "Story"
   issue.customFields."Epic Link".value = "PAR-22"
}

PAR-22 is the issue key of the Epic.