1
0
-1

Hello:


I am looking to sync Epics and Stories from a Jira server to Azure Devops and maintain the parent/child relationship. I don't need to sync from Azure Devops to JIRA. I just need a one-way sync from JIRA to Azure DevOps.


I was told this might work, but it does not. It does work for sub-task that have a parent Story, but not for Stories that have a parent Epic.


Outgoing JIRA:


replica.parentId = workItem.parentId 


Incoming Azure Devops:

if (replica.parentId) {   def localParent = syncHelper.getLocalIssueKeyFromRemoteId(replica.parentId.toLong())   if (localParent) {      workItem.parentId = localParent.id   }}


Any help would be greatly appreciated.

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hello,


      For sub-tasks and parents, the code you provided is perfect to sync over this information.


      With regards to Epics, it is necessary to incorporate the Epic scripts into the library in order to transmit all relevant information.

      For further information about how to do this, please refer to the accompanying documents.


      https://docs.exalate.com/docs/how-to-sync-epics-in-jira-on-premise


      https://docs.exalate.com/docs/how-to-add-an-external-script-in-jira-on-premise


      Thanks, let me know how it goes.


      Cheers



      1. Maggie Stearns

        I can add that groovy script to my JIRA server (and then restart I assume). Next, I can add this to the JIRA outgoing connector:

        Epic.sendEpicFirst()


        On the ADO side, what do I put on the incoming side?  I assume not this since ADO won't know about that right?

        Epic.receive()


        ()

      2. Maggie Stearns

        I am all set now. Thank you.

        This was the portion I didn't have on the ADO side:


        if (replica.customKeys."Epic Link"?.id){
            def localParent = syncHelper.getLocalIssueKeyFromRemoteId(replica.customKeys."Epic Link".id.toLong())
            if(localParent){
                workItem.parentId = localParent.id
            }
        }

      CommentAdd your comment...