Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Attachements imported by CSV are in the wrong format

David Coudron December 30, 2020

Hello,

I exported issues and attachements from a jira  server to import them to an other jira server.

So I followed this documentation to correctly import my attachements : 

https://confluence.atlassian.com/jirakb/how-to-convert-all-attachments-in-a-csv-file-to-use-file-protocol-for-an-external-system-import-973486944.html

With this method , the attachement are well imported but the format is still "file", the name is a number in 5 digit and I can't open them...

In my first instance I have mostly "png" attachement format. 

This is an example of CSV : 

summary,attachement
test1,file://CV3/21225

Screen of my issue on JIRA : 

 

Capture.PNG

Could you help me ?

Best regards,
David

 

 

 

 

1 answer

1 accepted

0 votes
Answer accepted
Radek Dostál
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.
December 30, 2020

Hi David,

 

I am a bit curious how the "can't open them" works here. From the screenshot it's apparent the file was saved, has a size, if you are able to verify that this is a PNG file (as suggested), are you able to open it in an image viewer, pbrush, anything? In other words, what program are you opening the file with? If it has no extension, Windows might be confused by it and not know how to open it, unless you specify the program to open it with.

 

As for why the file has no name or author or date - it's because of what you specify in the .csv. You have only provided the path to the file, and no metadata about the attachment.

You would need to import the file in another format containing the metadata, such as the following from this article (https://support.atlassian.com/jira-cloud-administration/docs/import-data-from-a-csv-file#ImportingdatafromCSV-Importingattachments):

"01/01/2012 13:10;Admin;image.png;file://image-name.png"

 

Where you would have to provide "some date" and "some user", if you don't care about this info, just fill it with dummy data. But the important part is the "image.png" -- this is the part which you need to provide for the file to be saved with the right name.

 

When you do a full .csv export of issues (=All fields), it includes "Attachment" columns, which contains this metadata. It will contain native file path which you want to replace with yours pointing to the jira_home/attachments folder, but, it's a start.

 

Let me know in case you have any question and/or if I can elaborate,

 

Thanks,
Radek

David Coudron January 12, 2021

Hello Radek,

Effectively I can open my attachment as an image.
It was my metadata that was wrong.

This is the first time that I made an import of attachments, sorry!

Thank you for your answer.

Suggest an answer

Log in or Sign up to answer