1
0
-1

I would like to synchronize Epics from Jira to ServiceNow and the stories under these epics should have a link to the corresponding Epic

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hi,


      Thanks for raising this question. In this case, the first thing you will need to do is actually synchronize the epics themselves. To do this, the Jira side only needs to be sending the issueType like so:


      Jira Outgoing:

      replica.issueType = issue.issueType


      Now in ServiceNow you can add a block of code that only applies when the received issue type is an Epic:


      SNOW Incoming:

      if (entityType == "epic") {
      	epic.correlation_id = replica.key
      	epic.short_description = replica.summary
      	epic.description = replica.description
      	epic.comments += replica.addedComments
      }


      This first part makes sure Epics are synchronized from Jira to SNOW. 


      For the second part we would like Jira Stories under the original Epic to be synced to ServiceNow under the corresponding Epic as well.


      Jira Outgoing Sync:

      //This will send the Epic information like "Epic link"
      Epic.send()


      ServiceNow Incoming:

      if(replica.customKeys."Epic Link" != null){
          def localEpic = syncHelper.getLocalIssueKeyFromRemoteId(replica.customKeys."Epic Link"?.id)
          if(localEpic){
              story.epic = localEpic.id
          }
      }


      This last part finds a local epic in ServiceNow based on the Epic Link of the story sent from Jira and assigns that epic to the corresponding ServiceNow story (smile)


      Thanks,


      André

        CommentAdd your comment...