Project

General

Profile

Actions

Feature #11087

closed

Calculate Total Time Spent on Parent Issue

Added by Jonathan Campbell over 12 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
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 listClosedJean-Philippe Lang

Actions
Actions #1

Updated by Evgeny Zhiryakov over 12 years ago

+1

Actions #2

Updated by Anton Nepomnyaschih over 12 years ago

+1

Actions #3

Updated by Evgeny Zhiryakov over 12 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.

Actions #4

Updated by Allan Story de Almeida Martins over 12 years ago

+ 1 with redmine 2.0.3

Actions #5

Updated by Rodrigo Merola Winterhalter over 12 years ago

+ 1 with redmine 2.0.3

Actions #6

Updated by Florian Schwab over 12 years ago

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

+1

Actions #7

Updated by Daniel Felix almost 12 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.

Actions #8

Updated by Ty You about 11 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.

Actions #9

Updated by Ty You about 11 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.

Actions

Also available in: Atom PDF