I have a list of over 100 projects that are earmarked for archival and are the only projects in the applicable Issue Type Scheme. I'm trying to move these projects into a similar scheme that doesn't require any Issue mapping.
Trying to use Scriptrunner I'm attempting to use the method:
addProjectAssociations()
found in the documentation here: IssueTypeSchemeService (Atlassian JIRA - Server 8.0.0 API), but I keep getting a "groovy.lang.MissingMethodException: No signature of method:" error.
Any help would be appreciated.
Here is my code for reference:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.issuetype.IssueType
import com.atlassian.jira.project.Project
import org.apache.log4j.Category
def projectManager = ComponentAccessor.getProjectManager()
def issueTypeSchemeManager = ComponentAccessor.getIssueTypeSchemeManager()
def loggedInUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser
def Category log = Category.getInstance("")
log.setLevel(org.apache.log4j.Level.DEBUG)
def projects = "RDCALERTS"
def serviceOutcome = issueTypeSchemeManager.addProjectAssociations(loggedInUser, 21300, projects)
if (serviceOutcome.isValid()) {
log.info("Issue Scheme Updated")
} else {
log.error("Update failed: ${serviceOutcome.getErrorCollection().errors}")
}