Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Subtask creation via CSV

auj012 January 25, 2022

Hi Everybody 

I need to to create  multiple subtasks under a certain epic and am testing with the following

Parent idIssue idIssue TypeSummaryStart dateEnd dateOriginal EstimateLabelAssignee
118 Sub-taskFirst test bulk creation1/25/20222/25/20223600MVP2Email associated with my account

I was able to map everything, validate is successful but subtask does not get created, I get the following error

2022-01-25 17:40:17,246 ERROR - Fatal error during import
java.lang.IllegalArgumentException: Sub-Task Issue cannot be null.

I am unable to put in a picture of the mapping Issue Type -> Issue Type. 

What am I doing wrong ? Please advice

 

4 answers

4 accepted

4 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 25, 2022

Sub-task imports in Jira are complex (I really want to type "unnecessarily" in front of "complex" in that sentence, but I have not yet worked out a way to improve it)

I want to be completely clear about what you are trying to import and how you are trying to do it to begin with, so I'm going to try to ask some simple "narrow it down" questions:

  • Are you using import into project as a non-admin user, or import CSV under Admin -> import?
  • Do you have Epics, Issues and sub-tasks defined in this project?  (At least one of each?)
  • Are you trying to create sub-tasks on the Epic, or under issues within the Epic?  (you can do both, but it might be important at which layer you are aiming for)
auj012 January 26, 2022

Nic

1. Yes I do have admin privileges but  will check again.

2.Yes we do please see attached.

3. I am trying to create a task/subtask -- under a Initiative.  After checking the above I noticed that "Sub-Task" is not a option, so I changed it to "Task" but now validate itself fails 

jiratypes.PNG

 

I noticed that "Sub-task" is not a option here,  so I checked it to Task and now validation fails with this

  • Issue 'First test bulk creation' doesn't have Subtask Issue Type, its Parent Id mapping will be ignored.

 

Dave Theodore [Coyote Creek Consulting]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2022

Correct.  You cannot create a sub-task that way. Since it needs to be associated with a parent, you can only create the sub-task from within the parent.  With CSV import, the parent you want the sub-task to be a child of must already exist when you perform the sub-task association.  A sub-task cannot stand alone.

auj012 January 26, 2022

That is what I thought as well but when I change the Issue type to a Epic or Task, to be created under the parent that I am interested in I get this 

 

  • Issue 'First test bulk creation' doesn't have Subtask Issue Type, its Parent Id mapping will be ignored.

 

The detailed log is this

2022-01-26 18:18:10,018 INFO - Importer started!
2022-01-26 18:18:10,021 INFO - Engine is running in Validation-only mode
2022-01-26 18:18:10,023 INFO - All issues will be imported to project: xxxxxxxxxxxxxxxxxxxxxxxxxxx
2022-01-26 18:18:10,024 WARN - Issue 'First test bulk creation' doesn't have Subtask Issue Type, its Parent Id mapping will be ignored.
2022-01-26 18:18:10,024 INFO - Creating issue: [externalId='autoid-7661170984644918240', summary='First test bulk creation']
2022-01-26 18:18:10,074 INFO - No problems found with issue 'First test bulk creation'
Dave Theodore [Coyote Creek Consulting]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2022

Are you ticking the box next to "Issue Type" and mapping what's in the CSV to what's in Jira? You need to do this for every field that has preset values (such as Resolution, Assignee, Select List fields, etc.)

auj012 January 26, 2022

yup I did that, please see this screen shot.

image.png

  • Issue 'First test bulk creation' doesn't have Subtask Issue Type, its Parent Id mapping will be ignored.
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2022

Yes, that's correct, you swapped from trying to create sub-tasks to creating standard issue types, so it can't have a parent anymore and doesn't need a parent id.

If you wish this to come in as a sub-task, you need to tell it to import as a sub-task type.

auj012 January 26, 2022

Nic

I still want to create the new item whatever it maybe task/epic under the parentid. How do go about it ?

Thanks

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2022

I can't answer that.  As stated before, there's no clarity on what you are trying to do, how, or what you want to end up with.

"I still want to create the new item whatever it may be task/epic under the parentid." is total nonsense, I have no way to work out what anything in that sentence might mean.

I think we need to go back to the first principles.  Could you describe what you are trying to do?

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2022

@auj012 

I agreed with @Nic Brough -Adaptavist- response.  

If you are trying to use CSV to create Task, then you don't need parent_id field in your mapping process.

As I mentioned in my posting, if you are trying to use CSV to create Sub-task, then you need to have valid parent issue key for parent_id field in your mapping process.  Please review my posting Jan 26, 2022 for more details.

Lastly "-118" doesn't look like an valid parent ID value, thus your import process to create sub-task will fail.

Otherwise, please clarify on what exactly you are trying to do.

We are here to assist you.

Best, Joseph

Dave Theodore [Coyote Creek Consulting]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 27, 2022

I think you might be getting the terms Atlassian uses mixed up.  I'll explain things using the words that Atlassian uses and explain how Epic relationships work. I will use letter case in the same manner Atlassian uses, to hopefully simplify things.

There are two layers of abstraction in Jira as far as Issue Types go in Jira.  There is an "Issue Type" and a "Sub-task." A Sub-task must be associated to a parent Issue Type, and the method of importing with this relationship is what has been explained in this thread.  Epic is a normal Issue Type, however it is displayed in Agile Boards in a manner that makes you think you have a 3rd later of abstraction (ie: grand parent -> parent -> child ) There are only parent -> child relationships, in reality.  The relationship between an Epic and a Story (for example) is made with an Issue Link.  The Board, however, makes you think that the Epic is  the grand parent, the Story the parent and the Sub-task the child. 

Reading between the lines a bit, it seems that you are trying to create a relationship between an Epic (parent Issue Type) and the built-in Task (also parent) Issue Type.  This is not possible using the Sub-task relationship, because Task is not a Sub-task Issue Type.  You would need to use Issue Link instead, if this is the relationship you are trying to create.  Hopefully that is helpful.

Like tatiana.bespalova likes this
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 27, 2022

A TLDR version of that:

Issue -> Sub-task relationship is done with sub-task code

Epic -> Issue relationships are done with the "Epic Link" field

(In fact, in the database, they are also issue link types, but they are not accessed by us users as issue links)

So, the question is, are you trying to 

  1. Create issues under Epics  (the import will need the epic link field filled, and an issue type that is a standard issue type)
  2. Create sub-tasks as part of issues (the import will need the parent id, and an issue type that is a sub-task issue type)
Like tatiana.bespalova likes this
auj012 January 31, 2022

In my setup "Components" were mandatory, after I added that field, it worked like magic. I just wish the exception was more clear. Thank you everybody for your help

0 votes
Answer accepted
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 30, 2022

@auj012 -

Great.  I am glad you got it fixed + letting us know by confirming that your parent ID (in your screenshots) was edited so to hide the necessary information.

Please click on everyone's suggested answer by "Accept Answer" when you have a chance.  So, other community members for the similar asks will be benefited from all of our suggestions

Best, Joseph

0 votes
Answer accepted
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 25, 2022

@auj012 -

Welcome to the community.  I agreed with @Dave Theodore [Coyote Creek Consulting]  statement.  If your EPIC issue is already created in your project, then you will need to add the Epic issue key in the Parent ID column.

Example - 2022-01-25_10-48-08.png

However, if you are creating the parent/child issues in a CSV file at the same time, then you can just provide the parent ID and not the issue key.

Example -

2022-01-25_10-53-51.png

Hope this helps.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

auj012 January 25, 2022

Hi Joseph

  I did , please notice the first column. 

This is the mapping of the columnsimage.png

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 25, 2022

@auj012 -

However 118 in your CSV screen doesn't seems to be a valid issue key. It is missing the projectkey.

Forgot to mention in your original ask - "I am unable to put in a picture of the mapping Issue Type -> Issue Type. "  Do you have issue type "Sub-task" included in your target project's issue type scheme?

Best, Joseph

Like tatiana.bespalova likes this
auj012 January 26, 2022

jiratypes.PNG

 

These are the types that are supported in my system Joseph. I had to show 118  since I am working on a confidential project. But in the sheet the fill key is there.

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2022

@auj012 - 

Based on your response to @Nic Brough -Adaptavist- , The problem is with your parent ID field as "-118" is not valid. 

image extracted from your reply -

2022-01-26_11-55-46.png

As mentioned by both Dave and myself, your CSV file parent ID cell need to have the actual EPIC's issue key (i.e. ACME-118 where ACME is the project key with the issue number).  

If that was fixed, when you map your CSV to the fields via the import process, you can should see the issue type (Sub-task) in the mapping screen.

You should also check your project's issue type configuration scheme to ensure that Sub-tasks issue type is there for your project. (Project settings >> Issue types)

2022-01-26_11-53-06.png

You will not see "Sub-task" in the create issue screen, since you cannot create a Sub-task directly via the Create Issue button.

Here is an example of the issue type configuration scheme

 

Best, Joseph

0 votes
Answer accepted
Dave Theodore [Coyote Creek Consulting]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 25, 2022

The "parent id" column needs to contain a valid, existing Jira issue number.

auj012 January 25, 2022

Hi Dave

  It does have a valid number since this is a public post and this is for workd I just edited it.

Thanks

auj012 January 30, 2022

Hi everybody

I was able to make this work, the issue was  "Components" the way Jira was setup, this was a mandatory field. Once I  populated that I was able to create it.

Thanks for every bodies help

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events