The Exalate team will be on holiday for the coming days - returning Jan 4
Enjoy & stay safe

How to keep parent-child relationship between Azurenode and Jira


How I can get the issue Links on the AzureDevops? I created an Epic, a task and I linked the Task as a Child of the Epic. but, I don't know how to get that information in the script. I'd like to send that information to a Jira Cloud instance. My objective is transfer that information to Jira Cloud, in order to have the same hierarchy structure. I found documentation to get linkIssues between Jira Server instances ( but it's not working to my case. Could you help me with that?

    CommentAdd your comment...

    1 answer


      To send that information from azure, you will do:

      replica.parentId = issue.parentId

      The more complex part happens in the Jira side incoming script. If you want to represent that info on issue links, first you will need to get the local issue linked with the parent work item from azure:

      def localParentKey = nodeHelper.getLocalIssueKeyFromRemoteId(replica.parentId)

      Then, you will want to create an issue link with it, something like this:

      def localParentKey = nodeHelper.getLocalIssueKeyFromRemoteId(replica.parentId)
      if(localParentKey){"/rest/api/3/issueLink", """{"outwardIssue": "${}", "inwardIssue": "${}", "type": {"name": "Relates"}}""")

      If instead of issue links, you want to use an epic link (assuming the parent issue is an epic in Jira):\

      def localParentKey = nodeHelper.getLocalIssueKeyFromRemoteId(replica.parentId)
        issue.customFields."Epic Link".value = localParentKey.urn

      I haven't tried this scripts yet, let me know how it goes.

      1. Michael Domingues

        Epic link works perfectly.
        but the link code not.. I'm still trying

        Now, on the Jira Cloud side, I'd like to put a Parent issue.
        I created a issue of type History and a issue of type Task. I want the Task type to be a child of the issue History.
        I tried using 

        issue.customFields."Parent".value = localParentKey.urn

        but, it doesn't work.

        How I could do it?

      2. Juan Grases

        Do you have a custom field named "Parent" if so, which kind of custom field is? When you say the task to be a child of issue history, do you mean that task is a "Sub-task" issue type? In that case you might do:

        def localParentKey = nodeHelper.getLocalIssueKeyFromRemoteId(replica.parentId)
          issue.parentId =

        This is how you set parent ids to subtasks.

      3. Michael Domingues

        Yes, it's about "sub-task". 
        It's working now. 
        Thank you

      4. Harinder Singh

        Hi Support this is what i need but below step is not working can you guys confirm on your side how to make this thing work?

        def localParentKey = nodeHelper.getLocalIssueKeyFromRemoteId(replica.parentId)
"/rest/api/3/issueLink", """{"outwardIssue": "${}", "inwardIssue": "${}", "type": {"name": "Relates"}}""")
      CommentAdd your comment...