Below is the scenario we face :
* Migrated a project from on-prem to cloud, out of which a few issues failed
* Manually exported those issues via CSV from the on-prem instance and imported them to the Cloud instance
* Due to security concerns we cannot open the On-prem instance to external access so the Attachments dont get imported via the url in the CSV
I tried to run the "Migrate to Cloud" with "Attachments Only" for that one project but that didn't work as well.
Made a REST API script to download the attachments of the issues, and then upload them via API again, it's not a clean workaround, and I loss the history of whose attachment it was originally but it got the job done for now.
Overal flow of the bash script :
* Get the list of issues in a file (used a while loop to read thru this file, line by line)
* fetch the issue details, and store them in a Var.
* Get the Content URL and Name from the issue details (this can be saved another tmp file if needed)
* Download the attachment and save the output with the same name as the issues's attachment name
* Upload to the issue in Jira Cloud with the same name
You need to pass your email+token in each attachment to securely upload an attachment to the Jira issue if these attachments are coming from a secure server. This document explains how to do that. Alternatively, you can always use REST API to add an attachment to issues by creating a script after the issues have been imported.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As mentioned in my post "due security concerns we cannot open the On-prem instance to external access".
Will check the REST API approach and see if that works out by any chance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You don't need to open your instance to the public. The method mentioned is a secure attachment upload done via CSV which requires that you pass an authentication credential in the CSV file you'll upload to your Jira cloud environment. Read the document to get the full context
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"pass an authentication credential in the CSV file" :Cannot do this either, the on-prem instance needs a VPN to be accessed.
I've made a REST API script to download the attachments of the issues, and then upload them via API again, it's not a clean workaround, and I loss the history of whose attachment it was originally but it got the job done for now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jehan Bhathena ,
As I know you need to change the Browse Project permission of the destination project to Public during the migration - Importing attachments via CSV file fails with exception
P.S. I know that the article is for Server but it's the same for cloud - 100% sure & it's working!
Other option is to open a ticket with the support team.
Hope it helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Magdalena Zhisheva
I cannot make the page public due to security concerns, and thus was looking for a different way to import the attachments.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jehan Bhathena ,
Well, in that case you can:
1. attach them manually or
2. contact the Atlassian support team and check if there is any other option.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.