Bulk project category change in Jira

How to change project categories in bulk in Jira?

This is possible, but you need to have a Scriptrunner. And it’s really simple, you just need to go to the Script Console, and paste this code:

import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.scriptrunner.parameters.annotation.ShortTextInput

@ShortTextInput(description = "List of project Keys separated by commas", label = "Project Key List")
String projectListString

@ShortTextInput(description = '', label = "New Category")
String categoryName

def projectManager = ComponentAccessor.projectManager
def projectList = projectListString.tokenize(' ,').findResults { pkey ->
def newCat = projectManager.getProjectCategoryObjectByName(categoryName)
if (!newCat) {
   return "There is no category by the name $categoryName. Manually assign that category to one project from the project settings first, then come back here to bulk-update more projects."
projectList.each {
   projectManager.setProjectCategory(it, newCat)

It will gives you a simple tool, where you can paste list of projects and new category for those projects.

And that’s all 🙂 Really easy copy-paste and it’s done.

Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.