/src/test/resources/examples/RemainingWorkInLinkedIssues.groovy
Groovy | 18 lines | 12 code | 6 blank | 0 comment | 2 complexity | 7aaec66726012d8fb07c646760765f6f MD5 | raw file
- package examples
-
- import com.atlassian.jira.ComponentManager
-
- def componentManager = ComponentManager.getInstance()
- def issueLinkManager = componentManager.getIssueLinkManager()
-
- def totalRemaining = 0
- issueLinkManager.getOutwardLinks(issue.id).each {issueLink ->
- if (issueLink.issueLinkType.name == "Comprises") {
- def linkedIssue = issueLink.destinationObject
- totalRemaining += linkedIssue.getEstimate()
- }
- }
- return totalRemaining ? componentManager.getJiraDurationUtils().getFormattedDuration(totalRemaining) : null
-
-
-