CSV import attachments

Jim Winsor May 2, 2014

I know you can specify the creation date, author, description, and where the attachment file resides in the markup to be used by the CSV importer to import attachments.

Is there any way to include the mime/type information in this markup? If not, how does the importer determine what type of file it is dealing with?

2 answers

1 vote
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 2, 2014

Hello Jim,

did u try this approach?

Importing attachments

You can attach files to issues created from your CSV file. To do this, specify the URL of your attachment in an 'Attachments' column within your CSV file.

Assignee, Summary, Description, Attachment, Comment
Admin, "Issue demonstrating the CSV attachment import", "Please check the attached image below.", "https://jira-server:8080/secure/attachment/image-name.png", "01/01/2012 10:10;Admin; This comment works"
Admin, "CSV attachment import with timestamp,author and filename", "Please check the attached image below.", "01/01/2012 13:10;Admin;image.png;file://image-name.png", "01/01/2012 10:10;Admin; This comment works"

(info) URLs for attachments support the HTTP and HTTPS protocols and can be any location that your JIRA server must be able to access. You can also use the FILE protocol to access files in the import/attachments subdirectory of your JIRA Home Directory.

https://confluence.atlassian.com/display/JIRA/Importing+Data+from+CSV

Regards,

Fabio

0 votes
Jim Winsor May 4, 2014

Hi Fabio, Thanks for the reply.

Yes, we are using the noted markup to import the attachments. To further describe the situation, the attachments are coming from a Bugzilla database, and are extracted to files that are named the same as the attachment ID in Bugzilla. The import CSV is then built to provide the date, author, attachment name, and file name as noted. Unfortunately, since the files are stored as a numeric id for the filename, no mime/type data is implied in the markup.

We attempted to use the bugzilla importer directly, but found that it did not align with our enviroment with regards to workflows, issue types, etc., so we opted to extract the issues to CSV and import that way.

Suggest an answer

Log in or Sign up to answer