I am attempting to move all archived projects to the default Issue Type Scheme but am having trouble. Here is what I have so far:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.project.Project
def schemeManager = ComponentAccessor.issueTypeSchemeManager
def defaultScheme = schemeManager.defaultIssueTypeScheme
def plist = []
//This section sets all archived projects to the Default Scheme
ComponentAccessor.getProjectManager().getArchivedProjects().each { it ->
plist += it.getKey()
}
for(item in plist){
def project = ComponentAccessor.getProjectManager().getProjectObjByKey(item)
def oldScheme = ComponentAccessor.getIssueTypeSchemeManager().getConfigScheme(project)
def oldId = ComponentAccessor.getIssueTypeSchemeManager().getConfigScheme(project).getId()
}
I have the code grabbing the right projects and the right scheme. I just can't find a method to remove the scheme.
This is a simple task for Issue Type Screen Schemes, but not for Issue Type Schemes.
Any help would be appreciated!
Have you reviewed this thread? It's a bit out of date, but it is trying to do pretty much what you are trying to do.
Thanks,
Kian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.