Feature #11087

Calculate Total Time Spent on Parent Issue

Added by Jonathan Campbell over 5 years ago. Updated about 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-
Resolution:Fixed

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.


Related issues

Related to Redmine - Feature #11253: Total time spent from subtasks on the issue list Closed

History

#1 Updated by Evgeny Zhiryakov over 5 years ago

+1

#2 Updated by Anton Nepomnyaschih over 5 years ago

+1

#3 Updated by Evgeny Zhiryakov over 5 years ago

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.

#4 Updated by Allan Story de Almeida Martins about 5 years ago

+ 1 with redmine 2.0.3

#5 Updated by Rodrigo Merola Winterhalter about 5 years ago

+ 1 with redmine 2.0.3

#6 Updated by Florian Schwab about 5 years ago

Issues #11566 and #11253 also describe this problem/feature.

+1

#7 Updated by Daniel Felix almost 5 years ago

  • 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.

#8 Updated by Ty You about 4 years ago

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.

#9 Updated by Ty You about 4 years ago

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