Forums

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

Trying to create sub-tasks under Tasks but only last sub-task is getting linked to Parent ID

Lalith Motay November 18, 2022

Team - Need help.

I'm trying to upload using external import around 10 sub-tasks under a task (which is "Parent ID"). getting below errors.

1. Until I provide the "Issue ID", i'm unable to import the sub-tasks. So created a new column to add Issue ID .

2. Kept Issue ID - as Parent ID & Name ( SSC-1 New Task)

3. Kept Parent ID as Parent ID only without Name - (i.e SSC-1)

Task ID NameParent ID
SSC-1 New TaskSSC-1

I swapped the Issue ID and Parent ID on the above table but all the tests are getting failed. Only the last column is getting the Parent-Child link completed and rest 9 are not getting linked to the Task i was to align the sub-task.

Is there any better way to upload sub-task and link to the task (which are already created).

1 answer

0 votes
Trudy Claspill
Community Champion
November 18, 2022

Hello @Lalith Motay 

Does the parent Task already exist in Jira or are you trying to create that at the same time you are creating the subtasks?

If you want to import subtasks to an existing Task you need to specify the Issue Key for the target Task in the import data for each subtask.

Let us say you have a Task with key ABC-123 in Jira and you want to import 2 subtasks to it.

Your CSV file would look something like this:

Issue Type,Summary,Parent
Subtask,first subtask,ABC-123
Subtask,second subtask,ABC-123

And when mapping fields you would map Parent to Parent Id.

Lalith Motay November 18, 2022

Thanks @Trudy Claspill . Yes Tasks are created and currently I'm only loading the sub-task and trying to link to the Parent ID. but of all the sub-tasks i'm loading, only the last column sub-task is getting linked to task. Rest of them are just getting created as individual sub-task without parent task linked to it. Providing Detailed log below. if you see the last few line items, out of 3 sub-task created, only one got aligned to Parent ticket. I see 3 times the same sub-task is been getting tagged to parent id and rest 2 are getting created as normal sub-task.

 

2022-11-18 18:01:58,647 INFO - Only new items will be imported
2022-11-18 18:01:58,647 WARN - Found 3 'External issue ID' custom fields. Some issues may be imported twice. Found custom fields: [External issue ID, External issue ID, External issue ID]
2022-11-18 18:01:58,649 INFO - Importing issue: [externalId='GES-2840 Onboard Application', summary='Follow up with technical discussion with IT owner']
2022-11-18 18:01:58,865 INFO - Importing issue: [externalId='GES-2840 Onboard Application', summary='Configure Logging']
2022-11-18 18:01:58,956 INFO - Importing issue: [externalId='GES-2840 Onboard Application', summary='Verify logging status']
2022-11-18 18:01:59,045 INFO - Reindexing last 3 issues imported ...
2022-11-18 18:01:59,191 INFO - Reindexing took 144 ms.
2022-11-18 18:01:59,191 INFO - 3 issues successfully created
2022-11-18 18:01:59,191 INFO - ------------------------------
2022-11-18 18:01:59,191 INFO - Finished Importing : Issues
2022-11-18 18:01:59,191 INFO - ------------------------------
2022-11-18 18:01:59,191 WARN - Found 3 'External issue ID' custom fields. Some issues may be imported twice. Found custom fields: [External issue ID, External issue ID, External issue ID]
2022-11-18 18:01:59,206 INFO - ------------------------------
2022-11-18 18:01:59,206 INFO - Importing: Issue Links & Subtasks
2022-11-18 18:01:59,206 INFO - ------------------------------
2022-11-18 18:01:59,206 INFO - Only new items will be imported
2022-11-18 18:01:59,207 INFO - Linking 'GES-2959' and 'GES-2840' as sub-task-link
2022-11-18 18:01:59,308 INFO - Created parent-child (sub-task) relationship between GES-2959 and GES-2840
2022-11-18 18:01:59,310 INFO - Linking 'GES-2959' and 'GES-2840' as sub-task-link
2022-11-18 18:01:59,311 INFO - Created parent-child (sub-task) relationship between GES-2959 and GES-2840
2022-11-18 18:01:59,312 INFO - Linking 'GES-2959' and 'GES-2840' as sub-task-link
2022-11-18 18:01:59,313 INFO - Created parent-child (sub-task) relationship between GES-2959 and GES-2840
2022-11-18 18:01:59,313 INFO - ------------------------------
2022-11-18 18:01:59,313 INFO - Finished Importing : Issue Links & Subtasks

Lalith Motay November 19, 2022

@Trudy Claspill - thanks able to resolve it. The issue id field is mandatory to link but the data should be empty. I had data in issue id column as well. So removed the data and kept the column blank and loaded with parent id. It worked.

Suggest an answer

Log in or Sign up to answer