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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,681
Community Members
 
Community Events
176
Community Groups

How to import Comments & Attachments using the CSV Importer

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

 

 

 

4 answers

1 accepted

3 votes
Answer accepted

@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.

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

@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

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.

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 Mar 09, 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.

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 

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 Jul 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 Jul 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!

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events