Modify ↓
Opened 4 months ago
Last modified 4 months ago
#10874 new enhancement
Reduce the estimated hours whenever a developer logs hours to a ticket
| Reported by: | k1@… | Owned by: | bobbysmith007 |
|---|---|---|---|
| Priority: | normal | Component: | TimingAndEstimationPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: |
Description
I'm using python 2.5 and trac 0.12.2
To visualize a burndown chart, I'm using estimationtoolsplugin.
Since timingandestimationplugin does not reduce the estimatedhours when a user logs hours to a ticket, the burndown chart does not decrease to zero. I've modified my local copy by replacing the following lines in ticket_daemon.py:
## If our hours changed
if not hours == 0:
newtotal = str(totalHours+hours)
save_ticket_change( db, ticket_id, author, change_time,
"hours", '0.0', str(hours), self.log)
save_ticket_change( db, ticket_id, author, change_time,
"totalhours", str(totalHours), str(newtotal), self.log)
save_custom_field_value( db, ticket_id, "hours", '0')
save_custom_field_value( db, ticket_id, "totalhours", str(newtotal) )
with:
## If our hours changed
if not hours == 0:
newtotal = str(totalHours+hours)
newestimated = str(estimatedhours-hours)
save_ticket_change( db, ticket_id, author, change_time,
"hours", '0.0', str(hours), self.log)
save_ticket_change( db, ticket_id, author, change_time,
"totalhours", str(totalHours), str(newtotal), self.log)
save_ticket_change( db, ticket_id, author, change_time,
"estimatedhours", str(estimatedhours), str(newestimated), self.log)
save_custom_field_value( db, ticket_id, "hours", '0')
save_custom_field_value( db, ticket_id, "totalhours", str(newtotal) )
save_custom_field_value( db, ticket_id, "estimatedhours", str(newestimated) )
Attachments (0)
Note: See
TracTickets for help on using
tickets.


In general this is not how we use this field, and so this will probably not be included by default. We tend to use the estimate field for comparing how well we estimated. For our usage case it makes sense to look at both the total hours and the original estimate and divide for a percentage accuracy.
However if you want it included and make it an option (that is disabled by default) then I would be happy to include this as optional functionality. I might get around to doing this myself, but probably not in a timely manner.