id	summary	reporter	owner	description	type	status	priority	component	severity	resolution	keywords	cc	release
10874	Reduce the estimated hours whenever a developer logs hours to a ticket	k1@ucla.edu	bobbysmith007	I'm using python 2.5 and trac 0.12.2\r\n\r\nTo visualize a burndown chart, I'm using estimationtoolsplugin.\r\n\r\nSince 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:\r\n{{{\r\n            ## If our hours changed\r\n            if not hours == 0:                \r\n                newtotal = str(totalHours+hours)\r\n                save_ticket_change( db, ticket_id, author, change_time,\r\n                                    "hours", '0.0', str(hours), self.log)\r\n                save_ticket_change( db, ticket_id, author, change_time,\r\n                                    "totalhours", str(totalHours), str(newtotal), self.log)\r\n                save_custom_field_value( db, ticket_id, "hours", '0')\r\n                save_custom_field_value( db, ticket_id, "totalhours", str(newtotal) )\r\n}}}\r\n\r\nwith:\r\n\r\n{{{\r\n            ## If our hours changed\r\n            if not hours == 0:                \r\n                newtotal = str(totalHours+hours)\r\n                newestimated = str(estimatedhours-hours)\r\n                save_ticket_change( db, ticket_id, author, change_time,\r\n                                    "hours", '0.0', str(hours), self.log)\r\n                save_ticket_change( db, ticket_id, author, change_time,\r\n                                    "totalhours", str(totalHours), str(newtotal), self.log)\r\n                save_ticket_change( db, ticket_id, author, change_time,\r\n                                    "estimatedhours", str(estimatedhours), str(newestimated), self.log)\r\n                save_custom_field_value( db, ticket_id, "hours", '0')\r\n                save_custom_field_value( db, ticket_id, "totalhours", str(newtotal) )\r\n                save_custom_field_value( db, ticket_id, "estimatedhours", str(newestimated) )\r\n}}}	enhancement	new	normal	TimingAndEstimationPlugin	normal				
