CSV import with multiple comments

Taylor Huston
Contributor
August 24, 2017

I am converting an XML file into a CSV to import a bunch of issues into JIRA 6.4

Using this documentation
https://confluence.atlassian.com/jira064/importing-data-from-csv-720412846.html

Here is the example format listd

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"

How would I change that if the issue had multiple comments tied to it? Clearly I don't comma seperate them :P.

2 answers

4 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 7, 2017

Hi everyone,

Branden's previous answer is correct.   You can import multiple comments on an issue if you're using the external CSV import.  You just need to create a separate column for each comment, with the same header name.  In turn Jira will import these as separate comments.  This is explained during the import process:

working1.png

The hard part here is making sure that your CSV file is formatted correctly.   The number of comment columns your CSV file is expected to have is dependent on the issue with the largest number of comments.   So if you have an issue that has 50 comments and that is the one with the most comments, your CSV file would be expected to have 50 comment columns in order to maintain the formatting.   Obviously the other issues won't have values for all 50 comment fields, but at least one issue would.

To reiterate on Branden's example,

 

Assignee, Summary, Description, Comment, Comment, Comment
Admin, "Issue demonstrating the CSV attachment import", "sample description.", "01/01/2012 10:10;Admin; First comment", "01/01/2012 10:10;Admin; This second comment", "01/01/2012 10:10;Admin; This third comment"
Admin, "another issue with only one comment", "blah test description", "01/01/2012 10:10;Admin; only comment for this issue", ,

This sample CSV only imports 2 issues.  The first has 3 different comments, but the latter only has a single comment.  You will notice that the last issue imported does have an additional two commas to help identify that there is no value to be imported for this field.  

 

@Sufian RashidIn your case, I'm concerned to learn if you are perhaps using the Bulk create CSV import instead of the external CSV import.  These two features in Jira are similar and often confused, but they have different options.  I don't believe the Bulk create let's you map comments fields in.  But if you go to the Cog Icon -> System -> External System Import  and then select CSV, you will find that this import process will allow you to select the comment body as information to be imported.

Sufian Rashid
Contributor
November 7, 2017

@Andy HeinzerThanks for directing me in the right direction.

Alphy Joseph September 10, 2018

is this done only by an admin? Because I don't see these options

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 26, 2018

@Alphy Joseph,

External System Import is only accessible by admins.

 

For more details please see also:

Julian Governale
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.
November 28, 2018

@Dario B This comment format is not working for me in Jira cloud

I have no issues importing any fields in my csv file but comments will not correctly import.  I have tried double quotes, triple quotes but in all cases the comment never is created with the correct author or date.

My comment field in my csv is as follows

"11/06/2018 09:44;kmuecke;This is my test comment"

But it always imports as

Any thoughts on what might be causing this?

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 29, 2018

Are you importing from External System Import?

Also, it may be worth opening a support ticket for this (in support.atlassian.net) to have this issue further investigated. 

Julian Governale
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.
November 29, 2018

I am doing it through the external system import, but i can do that and see what support comes back with. 

Jinjun Zhang December 7, 2018

For anyone else who has this issue,

turns out the solution is very simple, instead of doing:

"11/06/2018 09:44;kmuecke;This is my test comment"

have to do it either without quotation:

11/06/2018 09:44;kmuecke;"This is my test comment"

 Or separate quotation:

"Nov 26, 2018 8:54:53 AM";kmuecke;"This is my test comment"

 

Like # people like this
Julian Governale
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 7, 2018

For me. Then issue was the date format. All the over fields were using MMM/dd/yyy hh:mm AM/PM and that’s what we set in the import but comments were mm/dd/yyyy hh:mm so updating the comments date format fixed our issue. 

Like L L Hauge likes this
1 vote
somethingblue
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 24, 2017

Hi Taylor,

Maybe I don't understand your request.  You want to import issues into JIRA 6.4 from CSV and you would like to import an issue that has multiple comments.  If that is incorrect let me know.

If that is what you're trying to do you would just separate the values as it states in Importing Data from CSV:

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

In the example you provided, "01/01/2012 10:10;Admin; This comment works," if you wanted to add a second and third comment you would two other column headings of Comment and add the comment under the columns:

Assignee, Summary, Description, Attachment, Comment, Comment, 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", "01/01/2012 10:10;Admin; This second comment works", "01/01/2012 10:10;Admin; This third comment works"

Cheers,

Branden

Taylor Huston
Contributor
August 24, 2017

Hmmm, okay that would work, but what if I am doing multiple issues, each with different numbers of comments?

Like Dan likes this
Mirthe Valentijn
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 28, 2017

I would like to know this also! The documentation doesn't explain how to do this..

Ward Schwillens, Schwillie
Contributor
September 4, 2017

I have the same issue. How to import issues with multiple Comments with an admin CSV import. I want to create the issues, and within the same import process import the comments. If this is not possible is it possible then to import the comments in a separate import process? Which key fields are mandatory then to have in then in the CSV file. Do I add a record/line with the Issue key and a single comment per line, and add a next comment with the same issue key in a next record/line to import the next comment if there are multiple comments in an issue in my exported data?

 

Thanks for some feedback!

Sufian Rashid
Contributor
November 7, 2017

I have prepared the CSV as mentioned above; however i am stuck at mapping. There is no 'comment' column in dropdown to map to (as shown in screenshot below).

So where do I import the comments?

JIRA CSV Comment Import.png

Like # people like this
Chhaya Gadade September 19, 2018

@Sufian Rashid:map it with "Comment body"field.

Like Dan Sung likes this
Rudolf88
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 24, 2018

Hi,

What can I do, if the Comment body field does not appear?

In the Projetc config it appears under fields, but not during the import guide (Map fields). Could it be because in Project config only "Comment" and "Comments" is listed, but not "Comment body"?

Baru Lopez December 11, 2018

It'll appear if you go to the import wizard in Settings > System > external system import.

The import wizard from the search issue screen doesn't seem to allow it.

Like Michael Brown likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events