calculate the workload of an epic

andrea gelmetti June 30, 2016

This question is in reference to Atlassian Documentation: Configuring Estimation and Tracking

Is it possible to calculate the total estimated work and the total logged work for an epic containing issues which have sub-issues?

 

3 answers

1 vote
Darren Pegg
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 30, 2016

Yes.... Let me dig out a script

Darren Pegg
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 30, 2016

Using Scriptrunner 

 

 

CustomField = EPIC Total Time Spent which shows on an EPIC the total time spent across linked issues (Stories & subtasks)


{code:groovy}
import com.atlassian.jira.ComponentManager

import java.text.DecimalFormat

def componentManager = ComponentManager.getInstance()
def issueLinkManager = componentManager.getIssueLinkManager()

def totalTimeSpent = 0.0d

def epicTimeSpent = issue.timeSpent
if(epicTimeSpent) {
totalTimeSpent += epicTimeSpent
}

if(issue.getSubTaskObjects() != []) {
issue.getSubTaskObjects().each {epicSubTask ->
def epicSubTaskTimeSpent = epicSubTask.timeSpent
if(epicSubTaskTimeSpent) {
totalTimeSpent += epicSubTaskTimeSpent
}
}
}

if(issueLinkManager.getOutwardLinks(issue.id) != []) {
issueLinkManager.getOutwardLinks(issue.id).each {issueLink ->
if (issueLink.issueLinkType.name == "Epic-Story Link") {
def linkedIssue = issueLink.destinationObject
def linkedIssueTimeSpent = linkedIssue.timeSpent
if(linkedIssueTimeSpent) {
totalTimeSpent += linkedIssueTimeSpent
}

//if(linkedIssue.getSubTaskObjects().size > 0) {
if(linkedIssue.getSubTaskObjects() != []) {
linkedIssue.getSubTaskObjects().each {linkedIssueSubTask ->
def linkedIssueSubTaskTimeSpent = linkedIssueSubTask.timeSpent
if(linkedIssueSubTaskTimeSpent) {
totalTimeSpent += linkedIssueSubTaskTimeSpent
}
}
}
}
}
}

if(totalTimeSpent > 0) {
totalTimeSpent = totalTimeSpent / 60.0d / 60.0d / 8.0d //Seconds to Hours
}

//formatNumber(number: totalTimeSpent, Locale.ENGLISH, format: '##0.0')
//new DecimalFormat("#.#").format(totalTimeSpent);

totalTimeSpent
{code}

darrenpegg
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 30, 2016

Just amend it for Total Estimation of time...

andrea gelmetti June 30, 2016

Thank you for your quick reply. I will have a go, after installing the script runner which we do not have.

0 votes
Ravi Kumar June 30, 2019

Yes, you can use BigGantt plugin for to getting total time and work...

0 votes
Steven F Behnke
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 30, 2016

Epic SumUp can do this. You cannot do this natively out of the box.

https://marketplace.atlassian.com/plugins/aptis.plugins.epicSumUp/cloud/overview

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events