Sort comments added to JIRA issue Via CSV Import

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

Introduction

When importing issues via JIRA's CSV Importer, it is not possible to specify the order in which comments will be added to the JIRA issue. For example, the following CSV file contains 4 Comment fields:

1 2 Summary, Assignee, Reporter, Issue Type, Description, History, My_Comment, Last_Comment, Comment "Test issue", admin, admin, 1, , Comment_1, Comment_2, Comment_3, Comment_4

The CSV importer does not have any configuration/options to specify comments to be added to the JIRA issue with the following order: History, My_Comment, Comment, Last_Comment

Each of the column names are resolved during the import process via alphabetical order, e.g. in CSV import example above, comments are added in the following aphabetical order by JIRA:

1 2 3 4 Comment History Last_Comment My_Comment

This can be worked around by sorting the column names numerically. What we do is to simply rename the CSV columns and prepend a number beside it, like so:

1 2 3 4 3Comment 1History 4Last_Comment 2My_Comment

JIRA will now add comments to the issue during CSV import starting from 1History, and then followed by 2My_Comment, 3Comment, 4Last_Comment etc.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.