Importing Subtasks into Next-Gen Project: Issue is Not of Sub-task type (Story)?

Shanari Baird
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 10, 2020

I am attempting to import subtasks to an existing task and/or story of a next-gen JIRA project, but keep getting the error message listed below.sub-task-failed-import.PNGI am using a .csv file with the following data points:

  • Summary (filled in)
  • Priority (all set to medium)
  • Issue Type (all set to subtask)
  • Reporter (filled in)
  • Assignee (filled in)
  • Status (all set to to do)
  • Resolution (all set to unresolved)
  • Parent ID (all set to NPI-94)
  • Issue ID (left blank)

I am able to successfully upload the subtasks into a classic JIRA project. Is there something I'm missing in the import process for a next-gen project? 

5 answers

2 votes
Richard Sadler May 25, 2020

Hi All, don't know if you ever sorted this, but just had the same issue and found a really simple but annoying change that caused the problem...

In next gen projects, the "Sub-task" issue type is called "Subtask" (without the hyphen)...just remove the hyphen in the word "Sub-task" in the "Item Type" column of your import CSV and voila !!!

Chris Minett May 26, 2020

I can't remember if I tried changing the raw data to "subtask" without the hyphen, however I did manually map the value in the column to the Subtask type, at which point it shouldn't matter if the raw value is 'abc123' as long as it is correctly mapped! ("shouldn't" !)

As it seemed from the log that it wasn't ever going to work (creates the issue first, which can't be sub-type if not linked, then tries to link it later, not something that can be done using the UI, next-gen issues can't be converted), I used the API instead to create the issues in bulk.

Lost half a day to something that should have just been a simple CSV import, but I got the details migrated which I needed.

Like # people like this
Richard Sadler May 26, 2020

Thanks Chris....I've come to the same conclusion....with next Gen...Import functionality is just not there yet....whilst I can get subtasks for tasks,stories etc to link through the import, it is not possible yet to link the story to an epic (this is on the roadmap for 2020)....for now I use a manual workaround: I bring the Epic name in as a label then filter the backlog by label select all the items (by holding down the shift key on the keyboard), then drag them all at once to the epic in the epic panel...clunky but not too bad...

As far as custom fields goes though, it doesn't bring any data in (a known bug, not even on the roadmap to fix)..., oh and also you can't use imports to update records either. t only imports new records. I think the general principle is, if it requires custom fields And bulk processing, then Next gen won't be compatible for a while (and maybe never)...

I've even tried using automation to import into a classic project (which works seamlessly), then clone the item to the next gen, and because the fields (even if they have the same name) are different instances, the data do not transfer....I'll keep plugging away...or give up....nice talking to you !!

Like Abhishek Gupta likes this
Abhishek Gupta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 8, 2020

@Richard Sadler  is absolutely right.

Issue is with Next Gen template.

When I tried on classic template, same import works flawlessly.

My value of Issue Type for a Parent Task was "Story" and for Sub-Task was "Sub-Task"

It created sub-task as Sub-Task of the parent task as expected.

0 votes
Mayank Sharma
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 4, 2021

Workaround - Import into a Classic Project and then use Filters bulk move feature to move into nextgen project. This works!

0 votes
Beatriz Clavellina November 23, 2020

Any updates? I can see no improvements in the next-gen imports, 

Mayank Sharma
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 4, 2021

Workaround - Import into a Classic Project and then use Filters bulk move feature to move into nextgen project.

0 votes
Richard Sadler
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 8, 2020

Thanks all for your comments...so there is no straightforward direct  solutions to this, but I have fashioned a (horrible but working) workaround using automation....

I'm guessing there are options to use the REST API to get data in, but I don't have access to that yet, so I'm playing with the out of the box functionality to cobble together something to do what I would really expect to be the single most basic requirement for all customers. Let's face it, what NEW CUSTOMER will want to manually enter their PMO data into a system when migrating to this platform...big hurdle to change for  anyone using alternatives.

There are 2 basic problems with Next Gen importation...

1. You cannot import data into custom fields !!! (WHY ???)

2. Whilst during the import the parent link is maintained for Sub-task to parent, the epic parent is not..just disappears

So the basic approach I've taken is to use a custom field to hold the epic name then use scheduled automation to trawl through each epic, and find any items with the associated epic name in the custom field and add the epic link from the trigger epic.

But here's the problem, you can't import the data in the custom field ....Arrgh !!!...

So......

Have to use another workaround to get the custom field data in...knowing that classic projects import without issues, we can use a dummy classic project for the import stage, then use a global automation rule to Clone or copy the item along with its custom field data to the next gen project.....I'm now doing this and it is working fine...it's really messy, because global custom fields don't map to next gen projects...you have to create duplicate fields for the Next Gen and then in the automation rule, you copy from one custom field to the other...Same with the issue type, you can't just clone to "Same type as trigger" as they are different objects, so you have to use a If/Then condition and create an epic/story/action/subtask separately based on the issue type of the trigger....(again horrible, but it works), and to top it off, some of the fields in the next gen, can only be written to using the JSON.

SO HERE'S A QUESTION FOR THE DEVELOPERS...If Automation can populate custom fields, why can't the import ?  

Anyway...

Advise creating a scheduled (must be global) rule with JQL to find newly added items and then run the rest of the code on the found items...this will only count as 1 activity on your Global rule runs against your limits, as opposed to 1 for each line if you do it each time an item is created.

Now finally we've got the items created in the next gen project with their custom fields, and assuming one of those custom fields contains the Epic Name we can now use a second scheduled automation rule to look for each epic, then find any task with the custom field matching the epic name then add the key from the trigger epic to the epic link on those items !!! Link made..

btw, if you use a scheduled rule, you can either wait for the schedule to run or run it manually by opening the rule and clicking the "Run Rule" Button...I've actually set the schedules to run every 360 days to make it a manual rule that you can run on multiple items (again another workaround for limitations in automation...

okay...it's not elegant, but it can be done....the main question I'm asking myself is why I'm bothering...the only reason I'd like to use the next gen, is for the epic roadmap gantt...so I'm now looking at apps instead....and guess what ....yep none of the apps in the marketplace work properly with next gen epics either....so basically they've broken every app that uses epic associations for these next gen projects....back to classic it is for me then !!!

0 votes
Chris Minett May 13, 2020

I'm running into the same issue. Did you ever resolve this?

I followed the guide at https://confluence.atlassian.com/adminjiracloud/importing-data-from-csv-776636762.html where it says to use the "Issue Id" and "Parent Id" columns to relate issues within a single import, and I get the same error in the OP screenshot:

"Issue 'DOC-4' is not of a sub-task type (Task). It will not be a sub-task of the issue 'DOC-3'

The issues have correctly been correctly related, so it seems that next-gen is not following the "IssueType" column that I've mapped (values of 'Task' and 'Subtask' respectively, and manually mapped to make sure they're valid).

Chris Minett May 13, 2020

Based on the detailed log, this definitely seems to be an import issue. You cans ee that the issues are created first ("Importing: Issues ... Finished Importing : Issues") before the sub-task links are attempted next ("Importing: Issue Links & Subtasks").

It's not possible to create an issue as a sub-task without it being linked to a parent, so at I guess I assume the 'subtask' issue type is failing and reverting to default when it's created, which leaves it as the wrong type when trying to make it a sub-task.

Chicken and egg...!

 

2020-05-13 15:38:30,256 INFO - ------------------------------
2020-05-13 15:38:30,256 INFO - Importing: Issues
2020-05-13 15:38:30,256 INFO - ------------------------------
2020-05-13 15:38:30,256 INFO - Only new items will be imported
2020-05-13 15:38:30,264 INFO - Importing issue: [externalId='360000177417', summary='Parent task']
2020-05-13 15:38:30,369 INFO - Importing issue: [externalId='autoid--3617177154072017631', summary='Child sub-task']
2020-05-13 15:38:30,429 INFO - 2 issues successfully created
2020-05-13 15:38:30,432 INFO - ------------------------------
2020-05-13 15:38:30,432 INFO - Finished Importing : Issues
2020-05-13 15:38:30,432 INFO - ------------------------------
2020-05-13 15:38:30,434 INFO - ------------------------------
2020-05-13 15:38:30,434 INFO - Importing: Issue Links & Subtasks
2020-05-13 15:38:30,434 INFO - ------------------------------
2020-05-13 15:38:30,434 INFO - Only new items will be imported
2020-05-13 15:38:30,439 INFO - Linking 'DOC-4' and 'DOC-3' as sub-task-link
2020-05-13 15:38:30,439 ERROR - Issue 'DOC-4' is not of a sub-task type (Task). It will NOT be a sub-task of the issue 'DOC-3'
2020-05-13 15:38:30,448 INFO - ------------------------------
2020-05-13 15:38:30,448 INFO - Finished Importing : Issue Links & Subtasks
2020-05-13 15:38:30,448 INFO - ------------------------------
jhonveryfied
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 22, 2024

Change "Task" or "Sub-task" for "sub-task" in your file 

Suggest an answer

Log in or Sign up to answer