on the adaptavist website (here), there is a page that shows how you can track how much work there is in related issues. but i was wondering how you would turn that script, so it would actually show how many story points are left in a particular epic.
I am guessing here, but i am pretty sure i would need my epic link ID number; 10006
and instead of searching for
issueLinkManager.getOutwardLinks(issue.id).each {issueLink ->i would need
issueLinkManager.getOutwardLinks(issue.id).each {storyLink ->then, i am pretty sure instead of;
if (issueLink.issueLinkType.name == "Composition") {
def linkedIssue = issueLink.destinationObject
totalRemaining += linkedIssue.getEstimate() ?: 0i would replace ussielinktype.name with the story point id number and then somehow be asking the script to get all story point values from all linked issues and add them. but this is far as my knowledge goes
can anyone help?
thanks
(complete original script below)
package com.onresolve.jira.groovy.test.scriptfields.scripts
import com.atlassian.jira.component.ComponentAccessor
def issueLinkManager = ComponentAccessor.getIssueLinkManager()
def totalRemaining = 0
issueLinkManager.getOutwardLinks(issue.id).each {issueLink ->
if (issueLink.issueLinkType.name == "Composition") {
def linkedIssue = issueLink.destinationObject
totalRemaining += linkedIssue.getEstimate() ?: 0
}
}
// add the remaining work for this issue if there are children, otherwise it's just the same as the remaining estimate,
// so we won't display it,
if (totalRemaining) {
totalRemaining += issue.getEstimate() ?: 0
}
return totalRemaining as Long ?: 0L