My team has started planning sprints for the engineering productivity tools we work on, but we also have ad-hoc service work that I want to get folded into the sprints. I want to measure the cost of walkups on the "make the world a better place" work.
It would be helpful to have every issue that comes in through an issue collector automatically be added to this week's sprint. I looked at some other answers on this idea, one of which suggested a post-function, and I'm attempting to write that function using the scriptrunner plugin and groovy.
I'm stuck trying to get to the rapidview helper so I can quiz it for the most recent open sprint. I get a NPE on the getRapidViews call, so below I'm just returning rvHelper, which is null (unsurprisingly).
Any hints on what's wrong?
Thanks,
Rob
import com.atlassian.jira.ComponentManager
import com.atlassian.plugin.PluginAccessor
import com.atlassian.jira.bc.project.ProjectService
ComponentManager componentManager = ComponentManager.getInstance();
def jiraAuthenticationContext = componentManager.getJiraAuthenticationContext()
def user = jiraAuthenticationContext.getUser()
PluginAccessor pluginAccessor = componentManager.getPluginAccessor();
Class rvHelperClass = pluginAccessor.getClassLoader().findClass("com.atlassian.greenhopper.web.rapid.view.RapidViewHelper");
def rvHelper = componentManager.getOSGiComponentInstanceOfType(rvHelperClass.class);
return rvHelper
def rapidViews = rvHelper.getRapidViews(user)