I want to create a Scripted Field that contains the Sum of the Original Estimate of the Issue + the sum of each SubTask's OriginalEstimate.
Bonus would be to have that field as a number represented as Time.
Any ideas? Help would be much appreciated!
Solved it like this:
import com.atlassian.core.util.DateUtils
def result = 0
def issueEstimate = issue.originalEstimate
if (issueEstimate > 0) {
result += issueEstimate
}
issue.subTaskObjects.each { subTask ->
result += subTask.originalEstimate
}
return DateUtils.getDurationString(result)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.