How to bulk change project type?


We are planning to migrate from JIRA 6 to JIRA Software.  We have 53 legacy projects that we wish to keep as type 'Business'. They will be converted to type 'Software' by default and then I will have set each one individually back to type 'Business'.

Can I change project types in bulk? Perhaps by running a script?

Best regards


1 answer

1 accepted

You can write a groovy script to update the project type using this API method

com.atlassian.jira.bc.project.ProjectService.updateProjectType(ApplicationUser, Project, ProjectTypeKey)

It could be something like:

import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.bc.project.ProjectService;
import com.atlassian.jira.project.type.ProjectTypeKey
def type = new ProjectTypeKey("Business")//not sure about the exact type string
def ps = ComponentAccessor.getComponent(ProjectService.class)
def projectKeys = ["PI", "MTP", ....]
	ps.updateProjectType(user, ps.getProjectByKey(p),type); 

Thanks for your answer. Since I have 53 projects, it would be nice to populate list projectKeys programmatically. Do you know how I could do that please?

You can get them like this (of course then you need to filter some of them probably in case you don;t have to change the type of all projects):

import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.project.ProjectManager;
def pm = ComponentAccessor.getComponent(ProjectManager.class)

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,323 views 14 20
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot