Considerations for CSV and JSON comment imports on top of existing issues in Jira
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
This page outlines a few considerations to be taken into account by admin when importing Jira comments on top of existing issues in Jira.
Solution
CSV imports
Documentation
Product doc:Importing data from CSV
Useful Community thread:CSV import with multiple comments
Notes on the import
If you know which project you're importing on, your CSV header should only have the following:
1
Key,Summary,Comment,Comment
Yes, you will need to put your summary value again in the CSV because it's mandatory.
The number ofCommentcolumns should be equal to the biggest number of comments on the issues you're importing.
All other CSV records with less comments should still have empty comment fields.
The comment field in the CSV record is contains the timestamp in the Jira system's timezone and the author separated from a semi-colon from the comment body. This may present issues if the comment body itself contains a semi-colon.
While preparing for the import, you should:
Make sure the time format matches exactly the pattern you have in the CSV.
MapKeytoIssue Keyand checkMap field value.
MapSummarytoSummary.
MapCommenttoComment body.
Here's a example that would import 4 comments total, 3 on KANBONO-1 and 1 on KANBONO-2:
1 2 3
Key,Summary,Comment,Comment,Comment KANBONO-1,"Summary 1","01/01/2012 10:10;adsiifyzc; This comment from adsiifyzc works","01/01/2012 10:10;akskblbdl; This comment from akskblbdl works","01/01/2012 10:10;hyfdgw; This comment from hyfdgw works" KANBONO-2,"Summary 2","01/01/2012 10:10;hyfdgw; This comment from hyfdgw works",,
JSON imports
Documentation
Product doc:Importing data from JSON
Notes on the import
JSON imports are simpler and have less constraints. If you're importing comments on top of existing issues, just make sure you have a JSON file similar to the following to import multiple comments on top of an issue:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
"projects": [
{
"key": "KANBONO",
"issues": [
{
"key": "KANBONO-1",
"comments": [
{
"body": "This is a comment from adsiifyzc 5 days ago",
"author": "adsiifyzc",
"created": "2012-08-31T17:59:02.161+0100"
},
{
"body": "This is a comment from akskblbdl 1 day ago",
"author": "akskblbdl",
"created": "2012-08-31T17:59:02.161+0100"
}
]
}
]
}
]
}
Was this helpful?