Is it possible to create subtasks on an existing issues using JSON

We have teams that have created a ton of parent issues and now want to create all the subtasks that need to be associated to them.  I know CSV will not work can they use JSON?

5 answers

This widget could not be displayed.

Yes, you can. I just need to provide a parent field when creating the issue through JSON, as per the doc https://docs.atlassian.com/jira/REST/latest/#d2e384

 

Cheers!
Teilor

This widget could not be displayed.

Sorry I will need to re-clarify.  They are wanting to use the JSON importer as per https://confluence.atlassian.com/display/JIRA/Importing+Data+from+JSON to import just subtasks for their issues

This widget could not be displayed.

Based on comment from Przemyslaw Borkowski on the the link provided over you can use the subtasks object for this, but in your case (only import of subtasks) you are looking the parent id described under Creating sub-tasks as per https://confluence.atlassian.com/display/Cloud/Importing+Data+from+CSV    

Possible duplicate of CSV Importing of 'sub-tasks' and linking to existing 'Story'

 

This widget could not be displayed.

CSV cannot import sub-tasks unless you import the parent at the same time.  This team ONLY wants to import sub-tasks since they have ALL the parents already created.  They asked if they can use JSON but we are unsure how to assist them as we have never used the JSON importer before.

Not really, the JSON just offers a more complete option to import data, having more options do described data, but has the same limitations as the CSV importer. I think your best option here would be create your own script to read the data from the CSV ou JSON file you have and create the issues with the JIRA API.

Ahh ok.. What will happen if you export all parents to csv, then add the new subtasks to the same file, and re-import?

Thank you Teilor Soares. I will let me know. Alexander that is one way they could have done it but they were not interested initially but they may be inclined to now.

This widget could not be displayed.

I don't know about JSON, but importing subtasks to existing issue using CSV works for me. Just make sure that the value of Parent ID is the same as External Issue ID of the existing issue. You can add External Issue ID if the issue doesn't have one and delete it later after finishing the import

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

292 views 5 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you