Feature #11087
closed
Calculate Total Time Spent on Parent Issue
Added by Jonathan Campbell over 12 years ago.
Updated about 11 years ago.
Description
I noticed that redmine calculates the total estimated time on parent tasks using the estimated time of the sub tasks, it would be awesome to see this for Spent Time as well.
I think the problem lies in these lines:
In Redmine 1.4:
def total_spent_hours
@total_spent_hours ||= self_and_descendants.sum("#{TimeEntry.table_name}.hours",
:joins => "LEFT JOIN #{TimeEntry.table_name} ON #{TimeEntry.table_name}.issue_id = #{Issue.table_name}.id").to_f || 0.0
end
In Redmine 1.3:
def spent_hours
@spent_hours ||= self_and_descendants.sum("#{TimeEntry.table_name}.hours", :include => :time_entries).to_f || 0.0
end
I tried to replace the new line of old, but it did not help.
Issues #11566 and #11253 also describe this problem/feature.
+1
- Status changed from New to Closed
- Resolution set to Fixed
I added the relation to #11253.
This one here is another feature request. #11253 is about calculation on the issue list and this ticket, there's just the calculation on the parent issue.
But anyway, this already works in Redmine 2.2.1. This one seems to be already resolved.
I don't see this working in 2.3.2 stable - am I missing a config setting or something? I do not believe so...
Spent time on subtasks do not roll up - I still see zero's in the issues list for the parent tasks.
I don't see this working in 2.3.2 stable - am I missing a config setting or something? I do not believe so...
Spent time on subtasks do not roll up - I still see zero's in the issues list for the parent tasks.
EDIT: the patch presented in related issue #11253 indeed still seems to work for 2.3.2 stable.
Also available in: Atom
PDF