Questions for Confluence license has expired.

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

Epic link removal doesn't sync

 
1
0
-1

Hi,


we synchronise 2 Jira cloud instances with script. As we wanted to sync epics we set up our connections according to this article: https://docs.exalate.com/docs/how-to-sync-epics-in-jira-cloud
We use Epic.send() and Epic.receive() .


Adding epic link on a story works fine, but the removal of the epic link doesn't.


Is there any solution for this?


Thank you.


Richard

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hi Richard K,

      My apologies on the delayed response.
      To remove the epic link you can just set the value to 'null' in the incoming script.
      You first want to check if the replica is empty and that your issue still has the link, you can do something like this to check it.

      if (!firstSync && (replica.customKeys."Epic Link" == null && issue."Epic Link" != null)){
         // Removes Epic link when replica.customKeys."Epic Link" is null and the local issue still has it's epic link
        // To make sure you use the right field you can check it within the entity sync status.
         issue."Epic Link" = null
      }

      I hope this answers your question.


      Kind regards,
      Christophe De Beule

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

        Hi Christophe,


        in your solution "Epic Link" is the field on right side of the issue's view screen (like ont the printscreen below)?



        Does your script needs to define first "Epic Link" field in the script?
        Like this:
        Outgoing:  
        replica.customFields."Epic Link" = issue.customFields."Epic Link"

        Incoming:  issue.customFields."Epic Link".value = replica.customFields."Epic Link".value


        Or do I have to do something with Epic.send() and Epic.receive() ?


        Best regards,

        Richard



        1. Christophe De Beule

          Hi Richard K,


          With the Epic.send() & Epic.receive() function you will keep the child parent relation if the child is sent over.
          You don't need to send the "Epic link" fields separate.

          You don't need to define the "Epic link" field first Epic.send() and Epic.receive() will take care of it.


          I hope this helps.

          Kind regards,

          Christophe De Beule

        2. Richard K

          Hi Christophe,


          it works great! (smile)


          Thank you for your help.


          Best regards,

          Richard

        CommentAdd your comment...