How to import attachments using the CSV importer?

Chris Farver July 6, 2011

I'm currently trying to use the CSV importer to migrate to JIRA from old software, but have been running into trouble when trying to import attachments. So far I have been unable to find the correct syntax or any documentation that describes how to import successfully.

I have tried multiple different methods, the most recent using an FTP server that I set up, but I keep receiving errors, such as "Scheme 'ftp' not registered".

Anyone mind showing me how this can be done? Do the attachments have to be imported locally, or can they be pulled from elsewhere on the network? Could an FTP server work?

Thanks

6 answers

4 votes
James Thomas February 14, 2019

Hi All,

 

If you are trying to import issues from one instance to another instance, then there is a simple workaround we can apply here.

Make sure that the source and destination JIRA can talk each other. 

First add the group "Anyone" on to the "browse projects" permission for the source project, so that the destination JIRA instance can directly access the projects without authenticating.

Then export the issues into csv, make sure you are exporting the data with the option - Excel(All Fields) so that you can get the details related to the attachments  in a field, and do the csv import, it will import the attachment data from source to destination without any issues.

Don't forget the change the permission back to the original state ;)

 

Regards,

James

Hasna February 14, 2019

Bravo James ..... 

Excellent .. Thanks for your resolution and it works for our team.

 

Regards

Hasna

Prakash
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
September 12, 2019

Thanks James. It helped me too.

helpdesk June 13, 2020

Mr.James i could not upload attachments even after changing the permissions.we need to make changes only on source serverside rite.on the destination side i could not finf any group option.

Prakash
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
August 4, 2020

@helpdesk : You should be changing the permission in "Destination".

Go to the "Respective project's permission scheme" --> Add "Anyone" to the "Browse Projects" permission type.

1 vote
JustinA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 22, 2011

It is possible to import attachments via CSV.

Currently, there are two methods:

  1. you can use a public server for hosting (Dropbox, for example), and reference the file via HTTP URL.
  2. you can place the file in <tt>jira.install/atlassian-jira/folder/filename.extension</tt>, and refernce it by using http://IP:Port/folder/filename.extension in the CSV.

The format would be:

assign,subject,attachment
"Justin Alex","Test Case666",http://10.60.1.187:8344/attachment-import/test.pdf
0 votes
Dave Zoontjes October 29, 2020

First add the group "Anyone" or Public on to the "browse projects" permission for the source project, so that the destination JIRA instance can directly access the projects without authenticating.

Then export the issues into csv, make sure you are exporting the data with the option - Excel(All Fields) so that you can get the details related to the attachments  in a field, and do the csv import, it will import the attachment data from source to destination without any issues.

Also, you need the importer you can find via System, not the importer via All issues. (That one can't/show attachments as mapping field)

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 29, 2011

JIRA Command Line Interface allows you to import attachments via CSV or script.

0 votes
Chris Farver July 6, 2011

Maybe I misunderstood then, but the fact that there are built in fields for attachments in the CSV importer as wel as this line from the 2.2 release notes:

CSV importer can create attachments when point to a URL

makes it a little confusing, and hard to see that CSV cannot import attachments.


(Would add this as a comment, but it doesn't seem to be working)

Edit: Also it doesn't seem to make sense to me for this line to be included in the CSV Import Wizard if adding attachments isn't available

To import multiple attachments, versions, components or comments for the same issue please use multiple columns in CSV file. You can either use columns with a different name like Attachment 1, Attachment 2 then map each column to a corresponding JIRA field, or use the same column name (all columns with the same name are mapped to the selected field).

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 6, 2011

Seems it is possible to an extent. Check out JIM-237

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 6, 2011

Er, you can't import attachments from CSV - it only imports fields.

If you want to stick with using CSV for importing of the fields and do the attachments separately, I'd look at Jelly scripting which will at least let you batch import the attachments (It may even be easier to use your CSV to generate a Jelly script that creates the issues as well as attaching them, but that depends on the shape of your data)

Another option would be to use SOAP/RPC, which stops you needing to physically upload the files as well, as the whole lot is transferred from the machine running the SOAP program.

Ravichandra_Itagi September 15, 2019

@Nic B

 

can you please help me to import issues with attachments.

kindly suggest me the best steps to import issues with attachments using CSV import method.

Suggest an answer

Log in or Sign up to answer