How to import Jira issues using CSV or SQL


Using the runFromCsv and runFromSql including the propertyFile parameter, the Jira CLI supports a capability to import Jira issues with various options helpful for a number of scenarios.

If you are a Confluence user, then this can be made a lot easier for user as described in How to allow users to import Jira issues from Excel or CSV.


Command line
atlassian jira --action runFromCsv --file import.csv --propertyFile --common "--project zjiracli" --continue 
Action, Issue, Parent, Issue Type, Reporter, Summary, AffectsVersions, Custom1, Custom three, Text, comment, file, blah blah, ignore,

createIssue, , , bug, automation, A bug, "V1, V2", value1, value3, "Multi-line text with ""double quoted text"",
'single quoted text', and embedded separator", comment 1, , blah, ignore this,

createIssue, , , bug, automation, A bug, , value1, value3, "Multi-line text with ""double quoted text"",
with ending quote on new line
", comment 1, , blah, ignore this,

createIssue, , @issue@, subtask, automation, A bug subtask, , value1, value3, "See parent",
createIssue, , @issue@, subtask, automation, Another subtask, , value2, value3, "See parent",

addAttachment, @issue@,,,,,,,, attachment added to parent issue!!!,, src/itest/resources/data.txt

addComment,    @subtask@,,,,,,,,, comment for last subtask,
# Map field headings to parameters understood by the JIRA CLI
# - key values (left hand side) must not contain blanks, blanks can be escaped (with \) if needed
# - the first character of field names will be automatically lowercased (except for custom fields)
# - field headings with embedded blanks are ignored unless they are mapped
# - field heading that should be ignored should be mapped to blank
# - custom fields can either be specified by name, id (like customfield_10120), or id (like 10120)
# - value mappings can also be done, they are specific to the (mapped) field name

field.Comments = comment
field.Text = description
field.Issue\ Type = type
field.ignore =
value.type.item = task
value.type.subtask = Sub-task