Import multiple project components at once


As far I know, is posible to import multiple project components with a JSON file in JIRA (and that is great!!! I have to add 130 components!!) but I also need to set the Default Asignee to Component Lead, and I can t find the tag for do this.

I m using Jira Is posible to do this in my version or in a later one?

Thanks in advance.

4 answers

1 accepted

1 vote
Accepted answer

Hi all!!

Finally, I decided to use a small java application to read the information from a file, and use Jira API to create the components.

If it helps, this is the basic part of the code:

File file = new File(".\\components.txt");
		List<String> contents;
		try {
			contents = FileUtils.readLines(file);
			for (String line : contents) {
				String[] lines = line.split("#");
				final ComponentInput componentInput = new ComponentInput(lines[0],lines[0], lines[1],AssigneeType.COMPONENT_LEAD);
				final Component component = restClient.getComponentClient().createComponent("PROJECTID", componentInput, pm);
		} catch (IOException e) {

0 votes
Timothy Chin Community Champion Apr 29, 2013

And what way are you using to import/create in JIRA? REST?

As I can see in this documentation, when you add components you can only specify the name:

It looks like you can import it but then edit with the UI every component, at least for now with the beta release.

Ramiro, I had seen that documentation, but it s incomplete. It doesn t specify anything about component fields (or I couldn t find it) but I could specify description an Component Lead of a component with a JSON like this:

    "projects": [
			"key": "KEY",   
            "components": [
				{"name":"component","description":"component description","lead":"leaduser"}


Nice to know that. And just in case have you tried using 'default' as tag?

No luck :-(

I've tried also 'assigneeType'.

I'm afraid that's not possible. It's a shame, because I'll have to do by hand one by one ...

Timothy, I m using de JSON Beta importer.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,718 views 17 21
Read article

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