1
0
-1

Hi,


I know this has been asked before but the answer was that Exalate will check about it, but never found a proper answer. Is this being looked at or is not supported?


I am looking to sync the Parent Link between Initative and Epics so the relationship isn't lost. At the moment it adds Epics linked to Initiatives as sub-tasks. Obviously in my case this is incorrect and I want to retain Epics as Epics when they are linked  to  Initiatives.


If it helps i'm syncing  from Cloud to OnPrem.


Steven


Does exalate support "Parent Link" between initiative and epics



    CommentAdd your comment...

    4 answers

    1.  
      2
      1
      0

      Hi Steven,


      Of course it works, you have to create the issue hierarchy accordingly in Jira. We use this too, only we sync from ADO to Jira Cloud. In Jira Cloud, incoming looks like this:

      Jira Cloud Incomming
      // Parent <-> Child
      
      // Issue Type Mapping
      def typeMapping = ["Epic":"Portfolio Epic",
                         "Capability":"Capability",
                         "Feature":"Feature",
                         "Team Epic":"Epic",
                         "Product Backlog Item":"Story",
                         "Bug":"Bug",
                         "Task":"Sub-task",
                         "Risk":"Risk",
                         "Test Plan":"Test Plan",
                         "Test Suite":"Test Set",
                         "Test Case":"Test",
                         "Impediment":"Impediment"]
      
      def remoteTypeName = replica.issueType.name
      issue.setTypeName(typeMapping[remoteTypeName])
      
      if (replica.issueType.name == "Epic" && replica.parentId) {
         throw new com.exalate.api.exception.IssueTrackerException("Portfolio EPIC cannot be created: EPIC has a Parent ID which is impossible! Please check this issue and clean up")
      } else if (replica.issueType.name != "Epic" && replica.parentId) {
         def localParent = nodeHelper.getLocalIssueFromRemoteId(replica.parentId.toLong())
         if(localParent){
            issue.parentId = localParent.id
         } else {
            throw new com.exalate.api.exception.IssueTrackerException("Issue " + replica.issueType.name + " cannot be created: parent issue with remote id " + replica.parentId + " was not found. Please make sure the parent issue is synchronized before resolving this error")
         }
      }
      ADO Outgoing
      replica.parentId       = workItem.parentId
      replica.type           = workItem.type


      Maybe this will help you

      BR,

      Thorsten

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi Steven,


        try this:

        Incoming Sync (JDC)
        if(firstSync){
           issue.projectKey   = "KEY"
           // Set type name from source issue, if not found set a default
           issue.typeName     = nodeHelper.getIssueType(replica.type?.name, issue.projectKey)?.name ?: "Initiative"
        }
        issue.summary      = replica.summary
        issue.description  = replica.description
        issue.comments     = commentHelper.mergeComments(issue, replica)
        issue.attachments  = attachmentHelper.mergeAttachments(issue, replica)
        issue.labels       = replica.labels
        issue.status       = replica.status
        issue.priority     = replica.priority
        issue.issueLinks   = replica.issueLinks
        issue.key          = replica.key
         
        Epic.receive()
         
         
        def defaultUser = nodeHelper.getUserByEmail("no_reply@pyrsoftware.com")
        issue.reporter = nodeHelper.getUserByEmail(replica.reporter?.email) ?: defaultUser
        issue.assignee = nodeHelper.getUserByEmail(replica.assignee?.email) ?: defaultUser
         
         
        if(replica.parentId){
            def localParent = nodeHelper.getLocalIssueFromRemoteId(replica.parentId.toLong())
            if(localParent){
                issue.parentId = localParent.id
            } 
        }


        BR,

        Thorsten

        1. Steven Camilleri

          Hi Thorsten,


          Thanks for your reply, however this doesn't do anything. If I synced a linked Epic to Initiative it just adds it as a separate Epic.


          Any ideas?

        CommentAdd your comment...
      2.  
        1
        0
        -1

        Outgoing Sync (JDC):

        replica.key            = issue.key
        replica.type           = issue.type
        replica.assignee       = issue.assignee
        replica.reporter       = issue.reporter
        replica.summary        = issue.summary
        replica.description    = issue.description
        replica.labels         = issue.labels
        replica.comments       = issue.comments
        replica.resolution     = issue.resolution
        replica.status         = issue.status
        replica.parentId       = issue.parentId
        replica.priority       = issue.priority
        replica.attachments    = issue.attachments
        replica.project        = issue.project
        replica.issueLinks     = issue.issueLinks
        replica.parentId       = issue.parentId
        
        Epic.sendEpicFirst()
        
        
        


        Incoming Sync (JDC):

        if(firstSync){
           issue.projectKey   = "KEY" 
           // Set type name from source issue, if not found set a default
           issue.typeName     = nodeHelper.getIssueType(replica.type?.name, issue.projectKey)?.name ?: "Initiative"
        }
        issue.summary      = replica.summary
        issue.description  = replica.description
        issue.comments     = commentHelper.mergeComments(issue, replica)
        issue.attachments  = attachmentHelper.mergeAttachments(issue, replica)
        issue.labels       = replica.labels
        issue.status       = replica.status
        issue.priority     = replica.priority
        issue.issueLinks   = replica.issueLinks
        issue.key          = replica.key
        
        Epic.receive()
        
        
        def defaultUser = nodeHelper.getUserByEmail("no_reply@pyrsoftware.com")
        issue.reporter = nodeHelper.getUserByEmail(replica.reporter?.email) ?: defaultUser
        issue.assignee = nodeHelper.getUserByEmail(replica.assignee?.email) ?: defaultUser
        
        
        if(firstSync && replica.parentId){
            issue.typeName     = "Sub-task" //Make sure to use the right subtask type here.
        	def localParent = nodeHelper.getLocalIssueFromRemoteId(replica.parentId.toLong())
        	if(localParent){
        		issue.parentId = localParent.id
        	} else {
               throw new com.exalate.api.exception.IssueTrackerException("Subtask cannot be created: parent issue with remote id " + replica.parentId + " was not found. Please make sure the parent issue is synchronized before resolving this error" )
            }
        }
        
        
        
        


        Outgoing Sync (Jira Cloud):

        replica.key            = issue.key
        replica.type           = issue.type
        replica.assignee       = issue.assignee
        replica.reporter       = issue.reporter
        replica.summary        = issue.summary
        replica.description    = issue.description
        replica.labels         = issue.labels
        replica.comments       = issue.comments
        replica.resolution     = issue.resolution
        replica.status         = issue.status
        replica.parentId       = issue.parentId
        replica.priority       = issue.priority
        replica.attachments    = issue.attachments
        replica.project        = issue.project
        replica.issueLinks     = issue.issueLinks
        replica.parentId       = issue.parentId
        
        Epic.send()
        
        
        
        
        

        Incoming Sync (Jira Cloud):


        if(firstSync){
           issue.projectKey   = "KEY" 
           // Set type name from source issue, if not found set a default
           issue.typeName     = nodeHelper.getIssueType(replica.type?.name, issue.projectKey)?.name ?: "Portfolio"
        }
        issue.summary      = replica.summary
        issue.description  = replica.description
        issue.comments     = commentHelper.mergeComments(issue, replica)
        issue.attachments  = attachmentHelper.mergeAttachments(issue, replica)
        issue.labels       = replica.labels
        issue.status       = replica.status
        issue.priority     = replica.priority
        
        def defaultUser = nodeHelper.getUserByEmail("no_reply@pyrsoftware.com")
        issue.reporter = nodeHelper.getUserByEmail(replica.reporter?.email) ?: defaultUser
        issue.assignee = nodeHelper.getUserByEmail(replica.assignee?.email) ?: defaultUser


          CommentAdd your comment...
        1.  
          1
          0
          -1

          Hey,


          Thanks for this, could you clarify a few things? I already have some configuration how would about applying this, maybe I can share my config and would be willing to help to adapt this. I already tried contacting Exalate Support but they sent me here, so would appreciate some help on this. Also what is ADO?


          Thanks,


          Steven

          1. Thorsten

            I know the problem and that's why I ended up here. You are welcome to share your scripts here, maybe I can help you integrate the whole thing.


            BTW: ADO = Azure DevOps


            BR,

            Thorsten

          2. Steven Camilleri

            Hi, thanks for your help or trying to help slightly smiling face , I posted both sides above. I am quite new to Exalate so I might have oversent some stuff.

          3. Steven Camilleri

            With your configuration I keep getting:


            Portfolio EPIC cannot be created: EPIC has a Parent ID which is impossible! Please check this issue and clean up
            
            


          4. Thorsten

            The error comes from the fact that we work according to SAFe 2 and a Portfolio Epic can't have a parent because it is already the highest issue type. Since I assume that both Jira instances use the same issue types and the same hierarchy, this would have to be adjusted slightly.


            When I have some time later, I'll try to incorporate it into your scripts and post it here.


            Can you also send a screenshot of the issue hierarchy?

          5. Steven Camilleri


            Find attached above ^ slightly smiling face 

          CommentAdd your comment...