Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Function for Listing all the initial committed to tickets ?

Myron Kokhanovskyi May 14, 2018

I'm looking for a way of listing all the issues that were initially taken into the sprint at the "Sprint Start" event.

Right now as a workaround, i got to Burndown Chart Report and copy them manually from the Sprint Start event.

Would be great to know if there is a function that can do that 

1 answer

0 votes
Tarun Sapra
Community Champion
May 14, 2018

You can write a listener for "Start Sprint" event and list the issues or send them in email.

Similar Sample here from Script Runner docs

Tarun Sapra
Community Champion
May 14, 2018
import com.atlassian.greenhopper.service.rapid.view.RapidViewService
import com.atlassian.greenhopper.service.sprint.Sprint
import com.atlassian.greenhopper.web.rapid.chart.HistoricSprintDataFactory
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.scriptrunner.runner.customisers.PluginModuleCompilationCustomiser
import com.onresolve.scriptrunner.runner.customisers.WithPlugin

@WithPlugin("com.pyxis.greenhopper.jira")

def historicSprintDataFactory = PluginModuleCompilationCustomiser.getGreenHopperBean(HistoricSprintDataFactory)
def rapidViewService = PluginModuleCompilationCustomiser.getGreenHopperBean(RapidViewService)
def user = ComponentAccessor.jiraAuthenticationContext.getLoggedInUser()

def sprint = event.sprint as Sprint

if (sprint.state == Sprint.State.CLOSED) {
def view = rapidViewService.getRapidView(user, sprint.rapidViewId).value
def sprintContents = historicSprintDataFactory.getSprintOriginalContents(user, view, sprint)
def sprintData = sprintContents.value
if (sprintData) {
def incompleteIssues = sprintData.contents.issuesNotCompletedInCurrentSprint*.issueId
log.warn "incompelte issues id : ${incompleteIssues}"
}
}
Greg Bailey
Contributor
August 19, 2019

I was attempting to use this script to send email with incomplete issues on a sprint close event.  However, I get an error saying it cannot resolve the class 

com.onresolve.scriptrunner.runner.customisers.PluginModuleCompilationCustomiser

 Any ideas?  Im on Jira Server 7.13.5 with Scriptrunner 5.6.1.

Suggest an answer

Log in or Sign up to answer