CSV Import for multiple sub-tasks error
Asked by Vicky Lawrence:

I'm having issues importing a csv with multiple sub-tasks.

Every time I run the import, it will only take the first sub-task in the list then generate the following error. However, if I import the next item individually, it will create the sub-task without an issue.

Any idea how I can get the full list to import as sub-tasks?

The log shows:

```
2024-03-06 17:03:10,885 INFO - Importer started!2024-03-06 17:03:10,885 INFO - Engine is running in Import mode2024-03-06 17:03:11,042 INFO - All issues will be imported to project: Task Tracking - CX Team (TTCT)2024-03-06 17:03:11,057 INFO - Creating issue: [externalId='TTCT-20', summary='Testing / Certification']2024-03-06 17:03:11,516 INFO - Issue created successfully with Key [TTCT-39], [externalId='TTCT-20', summary='Testing / Certification']2024-03-06 17:03:11,695 INFO - Creating issue: [externalId='TTCT-20', summary='Go Live / Production Date (set a date)']2024-03-06 17:03:11,705 ERROR - Issue can't be created due to the error/s [ Parent issue ID: '27126' / Key: 'TTCT-39' can not be sub-task. ]2024-03-06 17:03:11,712 INFO - Creating issue: [externalId='TTCT-20', summary='First production order / confirmation / ASN / invoice validated']2024-03-06 17:03:11,721 ERROR - Issue can't be created due to the error/s [ Parent issue ID: '27126' / Key: 'TTCT-39' can not be sub-task. ]
```

The csv contains:

|----------|---------|------------|-----------------------------------------------------------------|----------|----------------|----------|---------------------------------------------------------------|
| Issue ID | Parent  | Issue Type | Summary                                                         | Priority | Customer Name  | Assignee | Description                                                   |
| TTCT-20  | TTCT-20 | Sub-task   | Testing / Certification                                         | Normal   | Elixir Kitchen |          |                                                               |
| TTCT-20  | TTCT-20 | Sub-task   | Go Live / Production Date (set a date)                          | Normal   | Elixir Kitchen |          | Switch staging set up to live account, ready for go live date |
| TTCT-20  | TTCT-20 | Sub-task   | First production order / confirmation / ASN / invoice validated | Normal   | Elixir Kitchen |          |                                                               |


Answers:
author: John Funk
body: Hi Vicky - Welcome to the Atlassian Community!

It somehow thinks that the one you created is now the parent for the next one. If the Parent already exists, why do you have a column for Issue ID? And are you mapping that to anything on the import. If so, don't do that. :) Just get rid of that column.

comments: author: Vicky Lawrence
body: Thank you that works! I thought I saw somewhere that Issue ID needed to be included, but looks like that was the block for getting multiple sub-tasks to load.


author: John Funk
body: Great! You would need that if you are creating the parent at the same time, you are creating the sub tasks.


author: Vicky Lawrence
body: Good to know, that's very helpful as well :)


Tags: cloud

jira-service-management

jira-service-management-cloud