How can I get a specific Notification Scheme object for later use in my script?
The script I have below returns: "Cannot invoke method getSchemeObject() on null object" which has to do with my line:
Scheme archivedScheme = schemeManager.getSchemeObject(schemeId)
What am I doing wrong here? Thanks!
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.project.ProjectCategory
import com.atlassian.jira.notification.NotificationSchemeManager
import com.atlassian.jira.notification.DefaultNotificationSchemeManager
import com.atlassian.jira.scheme.SchemeManager
import com.atlassian.jira.scheme.Scheme
def prList = ComponentAccessor.getProjectManager().getProjectObjects()
def projectManager = ComponentAccessor.getProjectManager()
final SchemeManager schemeManager;
Long schemeId = 12400
Long archivedCategory = 10500
Scheme archivedScheme = schemeManager.getSchemeObject(schemeId)
Get your schemeManager via the ComponentAccessor
def schemeManager = ComponentAccessor.notificationSchemeManager
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.