How to export issue and comment in CSV with proper format to import in Jira
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
The content on this page relates to platforms which are not supported. Consequently, Atlassian Support cannot guarantee providing any support for it. Please be aware that this material is provided for your information only and using it is done so at your own risk.
Summary
The guides in How to add comments to Excel export will only allow user to export the comments, but does not allow user to re-import the issue with comments using CSV import due to improper format of the comment. JIRA would need the proper format of "User;date Time stamp; Comments text" to be able to import back the comment to JIRA instance.
Environment
This article refers to CSV files exported from pre 7.2.0 Jira instances.
Jira 7.2.0 shipped the below feature that improves the handling of CSV files and exports comments in the correct format for import already:
JRASERVER-8580 - Getting issue details... STATUS
Solution
Use the following plugin to export issue and comment together in CSV https://marketplace.atlassian.com/plugins/com.deiser.jira.exporter
The plugin will automatically separate the date, commenter and comment's content,
Modify the excel by combining the three fields and adding a semicolon delimiter using below formula as an example.
=AJ6&";"&AK6&";"&AL6
AJ6: Date Column
AK6: Commenter
AL6: Comment bodyBy default, the plugin will export those comments to three columns
To understand better how concatenation works please refer to this page: https://support.microsoft.com/en-us/kb/280388
By default, the plugin will export those comments to three columns
Select the first empty columns on the right side of the table and enter the formula respectively according to you column number
You will notice that the three columns data have been concatenate with additional ';' between them
Click + Drag at the bottom right of the resulted column to the bottom of our data so that the formula is copied to all other columns below. Copy all those new columns.
Paste-Text-Only to replace the existing comment column by default, the plugin will export those comments to three columns
Delete the rest of the data in AK6: Commenter and AL6: Comment body
Delete the rest of the columns, leaving only the column with the concatenated data.
Proceed to upload your CSV file to you JIRA instance