Sort comments added to JIRA issue Via CSV Import
はじめに
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:
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:
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:
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.