Forums

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

Importing sub tasks using JSON

Alex Chunilal
Contributor
June 18, 2020

Hi All,

I have managed to import a Task and a sub task into Jira using the JSON import. However The task and sub take dont appear to be related in anyway when I look at them in Jira. 

I have done this via CSV format in the past and used IssueID and ParentID to link them and that worked. However in JSON i am struggling to get the link to work. Below is my example.

 

What am I missing ?



{
"projects": [
   {
     "name": "Project Name",
     "key": "PN",
     "issues": [
          {
          "status" : "Backlog",
          "id": "2",
           "parent":               
               {
               "id":"1"
               },
          "issueType":"Sub-task",
          "reporter" : "admin",
          "summary" : "This is the sub task",
          "externalId": "2"
          },
          {
          "status" : "Backlog",
           "id": "1",
          "issueType":"task",
          "reporter" : "admin",
          "summary" : "This is the main task",
          "externalId": "1"
         }
          ]
}
]
}

 Thanks in Advance

1 answer

1 accepted

0 votes
Answer accepted
Gökçe Gürsel {Appfire}
Atlassian Partner
June 18, 2020

 

Hi Alex,

You need to add a link section. Refer to the documentation below.

https://confluence.atlassian.com/adminjiracloud/importing-data-from-json-776636779.html

Best,

Gökçe

Alex Chunilal
Contributor
June 18, 2020

Hi Gokce,

 

Thanks for that. I read through this document before. I must have missed it. I added the link section and it works

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD Trial
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events