Forums

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

How do I set an original estimate on a subtask?

Keenan Smith February 9, 2018

I'd like to add an original estimate, not a remaining estimate to my subtasks in Jira, and I'd also like the original estimate in the subtask to be added to the original estimate in the main task. How would I do this?

3 answers

1 accepted

1 vote
Answer accepted
Victor Florin Pana
Contributor
February 9, 2018

If you have the "Time tracking" field added to you project then you should see both the Original and Remaining estimate fields.

By default if you are adding estimates in the sub-tasks they will be added to the parent issue's estimates. Both when adding the original estimate and when logging work. Normally you should not add manually the remaining estimate as that should be subtracted when you log work on the issue and the remaining will be calculated automatically.

Keenan Smith February 11, 2018

Thank you for your reply. 

According to my scrum master, tjis has been enabled, yet I see no area to add an original estimate on a sub task. Which section of Jira would I do this in? 

Jack Brickey
Community Champion
February 11, 2018

If you go to a specific issue and click Edit, do you see original and remaining estimate fields? If not click the configure fields in the top right and search for it to see if it is configured to display. 

Like Emon Khan likes this
Keenan Smith February 11, 2018

Ah thank you so much kind sir! This was the final solution 

1 vote
Jack Brickey
Community Champion
February 9, 2018

Note that you need to add the estimate at creation time or use the Edit function to add estimation to an existing issue. 

0 votes
Anthony Jasicki
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 23, 2020

Hello,

 

My solution for push-up the Original Estimate of Sub Tasks in parent Task :

  • With plugin : Script Runner
  • Create : Script Listeners
  • Set on these event : Task Update, Task Create
  • /!\Important/!\ Set on user : ScriptRunner Add-on User

 

And Copy & Paste this code :

 

if (!issue.fields.issuetype.subtask) { 
return
}

// Retrieve all the subtasks of this issue's parent


def parentKey = issue.fields.parent.key
def allSubtasks = get("/rest/api/2/search")
.queryString("jql", "parent=${parentKey}")
.queryString("fields", "parent,timeestimate")
.asObject(Map)
.body
.issues as List<Map>
logger.info("Total subtasks for ${parentKey}: ${allSubtasks.size()}")

// Sum the estimates
def estimate = allSubtasks.collect { Map subtask ->
subtask.fields.timeestimate ?: 0
}.sum()
logger.info("Summed estimate: ${estimate}")


// Now update the parent issue
int estimateHours = estimate / 60 / 60

logger.info("Parent Issue: ${parentKey}")
logger.info("Summed estimate in hours: ${estimateHours}")


put("/rest/api/2/issue/${parentKey}")
.queryString("overrideScreenSecurity", true)
.header("Content-Type", "application/json")
.body([
fields: [
timetracking: [
originalEstimate: estimateHours
]
]
])
.asString()

 

That's work ;) 

 

Anthony,

Suggest an answer

Log in or Sign up to answer