Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to import Comments & Attachments using the CSV Importer

Jodie Sleeman January 24, 2022

I am wanting to import tickets from my old team-managed project to company-managed project including all comments & attachments, but when using the 'Import issues from CSV' these fields are not available to map to.

Is there any other way of copying/importing issues from one JSM to another to include the comments and attachments?  As our customers will still need to see these in the history of the open tickets.

Thank you

 

 

 

6 answers

1 accepted

3 votes
Answer accepted
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 24, 2022

@Jodie Sleeman 

Hi Jodie:

Unfortunately, CSV import process doesn't support copying attachments/comments.  However, after the issues are created, you can then conduct a backend bulk updates of those issues by Systems > External System Import using a CSV file containing the issue key, issue summary, and issue comments information (based on your issues created in the initial import process).

You will need to prepare the CSV file for the backend bulk updates.  Keep in mind, you may need to combine your original issue's comments into one cell then map to "Comment Body" field.  NOTE - attachments will have to be manually attached in the project issue UI.

Lastly, you can search Marketplace to see if there are any third party add-ons that provide the services that you are asking.

Hope this helps.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

Jodie Sleeman January 26, 2022

Hi @Joseph Chung Yin 

Thank you for coming back to me, please can I ask what the project issue UI is and how I would go about importing the attachments into this?

Thank you

Jodie

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2022

@Jodie Sleeman -

In JSM's new issue view, you will need to access the issue from the project and click on the paper clip symbol in the comment section to attach the files manually.

2022-01-26_17-40-52.png

Or, you can just drag the file anywhere when you are viewing the issue via the project UI to attach the file.  Note this action will automatically create a new comment window where you will need to "Save" button to complete the process.

If you are using Jira Software Cloud, then the issue UI will have an Attachment button under the Issue summary line -

2022-01-26_17-46-02.png

Currently, there is an suggestion case with Atlassian on providing the "Attach" button back in the JSM's new issue view - https://jira.atlassian.com/browse/JSDCLOUD-8576.  I would recommend you to add yourself as a watcher to the ask.

Lastly, here is the link on how to attach file from Atlassian - https://support.atlassian.com/jira-service-management-cloud/docs/attach-files-and-screenshots-to-issues/

Hope this helps.

Best, Joseph

2 votes
David Mitchell October 18, 2022

Joseph, unfortunately your answer is not optimal and results in a lot of unnecessary work.

If one has access to the External System Import, then you should just import your new items (issues, comments, attachments, and all) using the External System Import and be done with it.

There's no need to do the multiple steps of using the project-level CSV Import to create the items, then create a new CSV with Issue Key data, then do a bulk update using the External System Import.

Just use the External System Import to create the items in one step.

0 votes
Nicholas Ayala March 18, 2024

Just in case anyone else stops by this page again here is a solution that we found when moving attachments from one project to another in Jira Cloud.

 

Importing attachments into Jira Cloud using CSV External System Importer 

Looks if you need to auth to get the attachments just do is modify the attachment URL at the beginning with 

https://<your-email@your-domain.com>:<api-token>acme.atlassian.net/path-to-attachment

make sure to replace the @ with %40

https://<your-email%40your-domain.com>:<api-token>acme.atlassian.net/path-to-attachment

0 votes
Michael -Get Report- November 2, 2023

Hi guys, sorry, will resurrect it once again.
It doesn't seem that the fields mapping has the "comment" option.

Screenshot 2023-11-02 at 7.26.27 PM.png

Am I missing something or was it removed?

*hope for the @Darryl Lee magic..

Maximiliano Javier Julio March 13, 2024

Hi Michael, did you find a way to import attachment through csv? 

0 votes
Troy Anderson October 19, 2022

I ended up writing scripts to use the API services to get attachments and comments moved over (this was from Axosoft to Jira, but Jira to Jira would work too).  Actually, for comments, in order to keep author and original creation date in place, I am actually using the JSON import into Jira (API export).  Have not come up with a solution for inline attachments though.

0 votes
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 9, 2022

Hi, sorry to Necropost, but I was looking for the answer to this, and unfortunately I don't think Joseph is correct.

https://support.atlassian.com/jira-cloud-administration/docs/import-data-from-a-csv-file/

You can import issues with multiple comments by entering each comment in a separate column.

(So the trick is to have multiple columns named Comment, and you'd have to make sure your data puts each separate comment in its own column.)

Similarly, you can even import Attachments if they are stored in a publicly-accessible website (you can remove the files after import).

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.

I believe this works with Multiple Attachments, although you'll have to make sure you have sufficient columns for Attachments and Comments.

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 9, 2022

Thanks @Darryl Lee - On rephrasing my statement on multiple comments.  Each individual comment associated with an issue must be in its own column in the CSV file.

Using CSV to attach file was something new to me.  Thanks.

Best, Joseph 

Dimitry Solomatin July 12, 2022

I dont think he rephrased. His answer was accurate where yours was not. Thank you Darryl. This is what I did with my import from the old system and it worked. My only issue isthat some of the comments had attachments in the old system. Any idea as to how to import comments with attachments in the same field? @Darryl Lee 

Darryl Lee
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 14, 2022

Hey thanks @Dimitry Solomatin - so I think to get comments with attachments (I'm assuming you're talking about inline attachments), you might be able to do this with two imports, but it will be tricky.

Your target (new company-managed) project and your first CSV import will need to have a field called "Original Key". In this first import, you will only import Attachments, not Comments.

Once you do your first import, you'll need to Export all of the issues from the the new project, including the important "Original Key" field and also the Attachment fields.

You will then need to do a second import, which is an UPDATE. You would add the Comments at this point, matching them based on the "Original Key" field. You shouldn't include any other fields other than "Issue Key", "Original Key" (really just for reference), and the Comments.

Anyways, this is all a _little_ theoretical.

In fact, I might try doing an import with Attachments and Comments together, but if that doesn't work, doing Attachments and then Comments ought to work. Technically. :-}

Darryl Lee
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 14, 2022

For funsies I tried exporting a few issues with attachments and comments from one project and importing into another.

So one of the attachments looked like this:

14/Jul/22 3:50 PM;admin;cpu.png;https://boomaster.atlassian.net/secure/attachment/10007/cpu.png

And a comment that included that attachment looked like this:

14/Jul/22 3:50 PM;557058:55df3d50-d179-4d17-b747-bf1484246c4f;!cpuutilization.png|width=200,height=200!

!cpu.png|width=200,height=200!

After I imported, I was really excited because I saw this:

Screen Shot 2022-07-14 at 9.25.44 PM.png

But then I saw the comment:

Screen Shot 2022-07-14 at 9.19.15 PM.png

So here's how attachment imports work: the URL of the attachment has to be publicly accessible. No password or auth.

Oops, yeah, this is in the documentation: Import data from a CSV file

Note that URLs for attachments support the HTTP and HTTPS protocols and can be located anywhere that your Jira Cloud site can access.

But what's not documented is that you can include a date/timestamp and filename. That might be handy.

Especially when if you look at the comment, it looks like you can also include a date/timestamp, a user (oof, Account ID now, thanks EU), and the image itself (referenced by filename) formatted in good old Jira markup format.

So it seems like if you moved all your attachments to a publicly accessible website (remember, no auth), and fixed the URLs, you could conceivably import issues with attachments and comments all in one fell swoop!

Like Ismael Jimoh likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events