Questions for Confluence license has expired.

Please purchase a new license to continue using Questions for Confluence.

How to sync only Subtask from Data center to Cloud Instance

 
1
0
-1

Hi,

Could you please let us know how to syn only Subtask from Data center to Cloud Instance?

Greetings.

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      From Data Center, send the parentId i.e.:

      replica.parentId = issue.parentId


      In the Cloud incoming,


      if(firstSync && replica.parentId){ issue.typeName = "Sub-task" 
      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" ) 
      } 
      }


      You can find documentation here: 

      https://docs.exalate.com/docs/how-to-sync-tasks-and-subtasks-in-jira-cloud

      https://docs.exalate.com/docs/how-to-sync-tasks-and-subtasks-in-jira-on-premise


      And the following post/video might be useful as well:

      Jira Cloud ServiceNow: Maintaining Issue Hierarchy

      Even though one of the systems involved here is ServiceNow, I believe the underlying concepts stay in tact. 


      Please note that for this all to work, the parent of the subtask must have been synced already. Otherwise you will receive an error on the destination side. Jira would not allow a subtask to be created without the parent being present. 


      Thanks

      Majid


        CommentAdd your comment...