Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot import issues with comments

Luke
October 1, 2018

I am trying to import issues with comments using JSON and i am getting error that "There was a problem validating the json file. The fields [issues, comments] are not valid."

 

Without "comments" field, everything works.

 

Any idea?

 

Thank you for help.

2 answers

0 votes
Luke
October 3, 2018

comments, which is an array, cannot be set to null. Instead if there are no comments for the issue, it should be set to empty array, like []

0 votes
Amin Tazifor
October 1, 2018

Hey Lukasz,

Can you post a sample JSON document?

Luke
October 1, 2018
{  
   "projects":[  
      {  
         "name":"XXX Software",
         "key":"XX",
         "description":"",
         "type":"Software",
         "template":"",
         "issues":[  
            {  
               "status":"Done",
               "priority":"Medium",
               "issueType":"Story",
               "updated":"",
               "voters":[  

               ],
               "summary":"Copy Data",
               "reporter":"xxxx",
               "component":"",
               "watchers":[  
                  "xxxxx",
                  "xxxx",
                  "xxxx"
               ],
               "description":"this is a bug description",
               "assignee":"xxx",
               "created":"2018-04-06T14:58:18.976196+00:00",
               "version":"",
               "edited":"",
               "milestone":"planned but not scheduled",
               "updated_on":"2018-09-25T16:33:33.584178+00:00",
               "externalId":182,
               "resolution":"Done",
               "labels":[  
                  "xxxx",
                  "import"
               ],
               "comments":[  
                  {  
                     "body":"was already created",
                     "author":"admin",
                     "created":"2018-09-25T16:33:33.616888+00:00"
                  }
               ]
            }
         ]
      }
   ]
}
Amin Tazifor
October 1, 2018

I am not able to reproduce on my end. I am able to upload with comments after make a few changes. 

Luke
October 1, 2018

ok, looks like I had "comments": null in some places... after I changed it to "comments:[] everything works now

 

thx

Suggest an answer

Log in or Sign up to answer