How to remove resolutions from Issue Attributes->Resolutions?

atuladhar September 2, 2019

During import from another project, a large list of resolutions were imported as dates, which do not contain any issues. Now, I need to delete those large list in bulk. Is it possible? If yes, how do I do that? I didn't find bulk delete option. Individual delete of each resolution is going to take a lot of  time. Please suggest

2 answers

1 vote
Ilya Turov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 2, 2019

I guess it's possible to achieve using Scriptrunner and jira's API, the script would look like this:

import com.atlassian.jira.component.ComponentAccessor 
import com.atlassian.jira.config.ResolutionManager

def newId = "1"
def okList = ["Fix", "Won't Fix", "Duplicate", "Cannot Reproduce", "Not a bug"]

def resolutionManager = ComponentAccessor.getComponent(ResolutionManager)
resolutionManager.getResolutions().findAll {
!(it.name in okList)
}.each {
resolutionManager.removeResolution(it.id, newId)
}

in newId variable you specify the id of resolution for issues which have the resolution which has been removed (since you probably don't have any issues with those resolutions yet just set any viable resolution), in okList - names of resolutions you want to keep. And execute it via scriptrunners script console.

But I'd recommend testing it first on non-production environment.

0 votes
Ollie Guan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 2, 2019
atuladhar September 2, 2019

Hi @Ollie Guan

So.. this is an unresolved issue?

My requirement is not to bulk change the issues with given resolution.. I understand that can be done. I actually need to bulk delete the resolutions set as Administrator.

Ollie Guan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 2, 2019

set resolution = Unresolved

Suggest an answer

Log in or Sign up to answer