Import issues using JSON format

Pranita Warik May 13, 2021

We usually import/update issues in bulk using the import csv format. Now we want to upload a textarea field, which has tabular data of below format:
||Header1||Header2|| so on
|Data1|Data2| so on
While importing in the form of csv, the data got imported but the \n character did not work. This means the data got imported as below:
||Header1||Header2|| |Data1|Data2| which is then not rendered as table format.

I am trying to import as json, but getting the below error: Checked the json format online, its a valid json. But still the error:
None issues and projects imported.
Failed to create data bean

PFA the JSON format as shared on this link:
https://confluence.atlassian.com/adminjiraserver073/importing-data-from-json-861253756.html

Is there any alternate method to import the customfield with \n in bulk?

3 answers

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2021

Hi @Pranita Warik 

I saw a similar post about newline character processing and JSON or smart values in REST API calls.  The solution for that one was to use \\n in place of just the newline.  Please try that syntax.

Best regards,

Bill

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 13, 2021

I can't speak to your JSON issue, but have you tried exporting to CSV an issues that is already in JIRA that contains a tabular format, and then using that as a template for creating the CSV import data?

Pranita Warik May 13, 2021

@Trudy Claspill 

Hello,

I exported an issue having the tabular data and used it as a template to import. Still the \n character gets skipped.

0 votes
Pranita Warik May 13, 2021

{
"projects": [
{
"name": "Invoice Submission Workflow",
"key": "INVOICE",
"type": "software",
"issues":[
{
"key": "INVOICE-680",
"customFieldValues":
{
"fieldName": "Claim Details",
"fieldType": "com.atlassian.jira.plugin.system.customfieldtypes:textarea",
"value": "||Claim ID||Bill Number||Claim Amount||Claim Status||Initiator||Vendor Name||Claim Start Date||Settlement Date/Posted Date||\n|VP2104051602286|DECB02211069315|31784|Payment Settled|Suma Gaud|YMA50X:MAHANAGAR TELEPHONE NIGAM LIMITED|05-04-2021|08-04-2021|\n|VP2104051602312|DECB02211069318|31784|Payment Settled|Suma Gaud|YMA50X:MAHANAGAR TELEPHONE NIGAM LIMITED|05-04-2021|08-04-2021|\n|VP2104051602391|DECB02211069316|31784|Payment Settled|Suma Gaud|YMA50X:MAHANAGAR TELEPHONE NIGAM LIMITED|05-04-2021|08-04-2021|\n|VP2104051602396|DECB02211069319|31784|Payment Settled|Suma Gaud|YMA50X:MAHANAGAR TELEPHONE NIGAM LIMITED|05-04-2021|18-04-2021|\n|VP2104051602400|DECB02211069320|31784|Payment Settled|Suma Gaud|YMA50X:MAHANAGAR TELEPHONE NIGAM LIMITED|05-04-2021|08-04-2021|\n|VP2104051602425|DECB02211069317|63218|Payment Settled|Suma Gaud|YMA50X:MAHANAGAR TELEPHONE NIGAM LIMITED|05-04-2021|30-04-2021|\n|VP2105061618555|MECB02203199645|31784|Pending for Processing at SSC|Suma Gaud|YMA50X:MAHANAGAR TELEPHONE NIGAM LIMITED|06-05-2021|00-01-1900|"
},
"summary": "MTNL invoices"
},

Suggest an answer

Log in or Sign up to answer