Common Format Type for Comma-Separated Values (CSV) Files
Assets and Inventory plugin for JIRA follows the Microsoft CSV file format as below:
1. Each file must contain the form headers. Please see Import Assets from CSV "Import/Export via Excel (CSV)" / "Export template" section.
2. Each record is located on a separate line, delimited by a line break (CRLF). For example:
Asset name,bbb,ccc CRLF zzz,yyy,xxx CRLF
3. The last record in the file may or may not have an ending line break. For example:
Asset name,bbb,ccc CRLF zzz,yyy,xxx
4. Each line should contain the same number of fields throughout the file.
5. Each field may or may not be enclosed in double quotes. If fields are not enclosed with double quotes, then double quotes ma not appear inside the fields. For example:
"Asset name","bbb","ccc" CRLF zzz,yyy,xxx
6. Fields containing line breaks (CRLF), double quotes, and commas should be enclosed in double-quotes. For example:
"Asset name","b CRLF bb","ccc" CRLF zzz,yyy,xxx
7. If double-quotes are used to enclose fields, then a double-quote appearing inside a field must be escaped by preceding it with another double quote. For example:
Asset Name, bb, cc "aaa","b""bb","ccc"
New Line Characters
Windows standard CR+LF or Unix-like systems (Linux, Mac) standard LF may be used as new line character. (Reference: https://en.wikipedia.org/wiki/Newline.)
If you upload a CSV file that contains new line characters in the fields other than Text Area Field, it will be saved to the system but only Text Area Field preserves the new line if you edit the Asset. Other fields like "Text Field" will trim the new line character if you edit and save Asset at Asset Edit page.
Sample CSV File with Double Quotes and New Line Characters
Below is a screenshot of the MS-Excel. Form has an asset name, and two extra fields Author(Text) and Notes(TextArea). First line is the header from the template.
And here is the text representation of the file:
Asset Name,Author [Text],Notes [TextArea] Sample one from csv upload,"New line character at Text field This is the second line including commas; (1,2,3) This is the third line including double quotes ("" and "")","This field has 3 lines This is the second line including commas; (1,2,3) This is the third line including double quotes ("" and "")" Sample two from csv upload,"New line character at Text field second line and this is "" double quotes third line and this is , comma","first line and this is "" double quotes second line and this is , comma"