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 ->
   projectManager.getProjectByCurrentKey(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.

Powerscript for Jira – how to block editing a field or fields for a given role or roles.

Power Scriptsâ„¢ – Jira script automation
JIRA PowerScript Sctipts Plugin is a very useful plugin if you want to automate tasks while working with Jira projects to save time on repetitive tasks. The most important features are the ability to automate repetitive tasks, scripts added to the workflow, transit, and event listener.

It can be found on atlassian marketplace under this link. Unfortunately, it is not free, but the price is very affordable.

Script code

Read more Powerscript for Jira – how to block editing a field or fields for a given role or roles.