1
0
-1

Hello,


We have recently migrated several Jira Cloud projects to a Jira Data Center (DC) instance. All of the issue data has been migrated using the native CSV import method and the Jira DC instance is now considered Production. The Jira Cloud site is in a read only state and will be retired at the end of the week. The only data element which was not migrated were the Jira issue attachments.


Both the Cloud and Data Center instances are licensed for Exalate and have an established connection. What would be the appropriate incoming and outgoing script to send all of the attachments from Cloud to their respective Jira issues on Data Center? I want to ensure we do not modify any data other than adding attachments to issues that had them in the Cloud.


Thanks in advance for any help,

David

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hi David Grizzell 


      You can use the standard attachment sync approach - assuming that the issues are already connected


      Outgoing | Untested
      // ********************* start of script
      
      // carry over the metadata of the attachments
      replica.attachments = issue.attachments
      
      // ********************* end of script


      and


      Incoming | Untested
      // ********************* start of script
      
      // carry over the metadata of the attachments
      issue.attachments = replica.attachments
      
      // ********************* end of script



      Then you will have do a bulk exalate on all the issues that needs to have attachments transported.  As long as the replica is different from the previous sync transaction a new transaction will be triggered

      YMMV (your mileage may vary) - so first try it out on a couple of issues


      QQ - Are you migrating from Cloud to DC or the way around (which is what we see a lot)?

      1. David Grizzell

        This is actually from Cloud to DC, which I realize most folks are migrating the other direction these days. Thank you for the response. I will test this morning.

      2. David Grizzell

        Hi Francis Martens (Exalate),


        I tested with the scripts you provided on a single issue. I encountered errors on the target (DC) side indicating that issuekey and issuetype were required for incoming sync. I added those elements and re-exalated. The outcome is that an entirely new issue was generated on the target site with a new issue key instead of adding the attachments to the existing issue. Is there something that needs to be added to the script in order to properly match the existing issues up before the attachments can be sent over?

      3. Francis Martens (Exalate)

        The assumption is that the issues are already under sync.

        If not - there will be a new issue created.

        To avoid the situation add to the DC side

        // Don't apply the logic when it is a first sync
        if (firstSync) {
            return
        }



        To ensure that the issues are connected - please use the bulk connect 
        https://docs.exalate.com/docs/bulk-connect
        Don't enable any of the toggles.


        Let me know

      CommentAdd your comment...