Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Instructions

...

You’ll find this article helpful if you use an old Server version of Jira (a version below 7.13.0), that it’s not supported by Configuration Manager for Jira Cloud - which supports migrating Jira configurations and data from Jira Server (starting on version 7.13.0) to Cloud.

Instructions

Follow the below CLI actions to migrate the attachments from the server to the cloud.

  1. Run the below CLI action to get the attachment name along with the Jira issue.
    --action runfromIssueList --jql "project = JD" --common "--action getAttachmentList --issue @issue@ --file "test2.csv" --append --outputFormat 999"
    Once the CSV is downloaded from the CLI action you need to reconstruct the CSV file as below. Like, replace the Name parameter to file. Make sure the same issue is present in the Cloud Jira instance as well.

    Image Added
  2. Use the below CLI action to download the attachments to the specific directory.
    --action runFromIssueList --jql "project = JD" --input "--action runFromAttachmentList --issue @issue@ --common "--action getAttachment --issue @issue@ --name @attachmentId@ --file @attachment@""

  3. Run the below CLI action and use the downloaded CSV file to add the attachment to the Jira issue.
    --action runFromCsv --file test2.csv --common "--action addAttachment" --continue --server "https://<<cloud instance URL>>.atlassian.net" --user "<<emailaddress>>" --token "<<token>>"

Note

The attachment names should not have special characters in the name of the file.

For a great number of attachments, a more straightforward solution (provided from v10.3) allows to copy the attachments between issues, from different instances - Server to Cloud.

myJira -a copyAttachments --issue jira-1 --toIssue jira-23 --targetServer myJiraCloud