Project

General

Profile

Actions

Feature #5010

open

Hours per project per user

Added by Jiří Křivánek over 14 years ago. Updated over 12 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Roadmap
Target version:
-
Start date:
2010-03-08
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

I am strongly missing the estimated hours per project and per user. The attached image shows one of the pages of the Roadmap project tab. Quite perfect but it just displays the numbers of issues per user (completed slash total). I need (or better to say my management rerquires) the hours (completed slash total).

Any chance to have this simple feature soon?


Files

redmine-req.png (191 KB) redmine-req.png Visual demonstration of my feature request. Jiří Křivánek, 2010-03-08 16:52
redmine-req-1.png (266 KB) redmine-req-1.png Jiří Křivánek, 2010-03-08 17:23
Actions #1

Updated by Jiří Křivánek over 14 years ago

Even better place for the time estimate is demonstrated by the second attached image. Well, I can realize that the previous was just easy but this one is a bit difficult...

Actions #2

Updated by Jiří Křivánek over 14 years ago

Perhaps this could help:

I updated the versions_helper.rb file, the render_issue_status_by method this way:

  def render_issue_status_by(version, criteria)
    criteria ||= 'category'
    raise 'Unknown criteria' unless STATUS_BY_CRITERIAS.include?(criteria)

    h = Hash.new {|k,v| k[v] = [0, 0]}
    if criteria == 'assigned_to'
    begin
      # Total estimated hours
      Issue.sum("estimated_hours",
                  :group => criteria,
                  :conditions => ["#{Issue.table_name}.estimated_hours is not NULL AND #{Issue.table_name}.fixed_version_id = ?", version.id]).each {|c,s| h[c][0] = s.to_i}
      # Open issues count
      Issue.sum("(estimated_hours * (100 - done_ratio)) / 100",
                  :group => criteria,
                  :include => :status,
                  :conditions => ["#{Issue.table_name}.estimated_hours is not NULL AND #{Issue.table_name}.fixed_version_id = ? AND #{IssueStatus.table_name}.is_closed = ?", version.id, false]).each {|c,s| h[c][1] = s.to_i}
    rescue ActiveRecord::RecordNotFound
    # When grouping by an association, Rails throws this exception if there's no result (bug)
    end
    else
    begin
      # Total issue count
      Issue.count(:group => criteria,
                  :conditions => ["#{Issue.table_name}.fixed_version_id = ?", version.id]).each {|c,s| h[c][0] = s}
      # Open issues count
      Issue.count(:group => criteria,
                  :include => :status,
                  :conditions => ["#{Issue.table_name}.fixed_version_id = ? AND #{IssueStatus.table_name}.is_closed = ?", version.id, false]).each {|c,s| h[c][1] = s}
    rescue ActiveRecord::RecordNotFound
    # When grouping by an association, Rails throws this exception if there's no result (bug)
    end
    end
    counts = h.keys.compact.sort.collect {|k| {:group => k, :total => h[k][0], :open => h[k][1], :closed => (h[k][0] - h[k][1])}}
    max = counts.collect {|c| c[:total]}.max

    render :partial => 'issue_counts', :locals => {:version => version, :criteria => criteria, :counts => counts, :max => max}
  end

It appears to do what I needed: It displays the estimated hours rather than the issues counts.

Could you please include my piece of code with one of the next Redmine releases, as another option pickable from the dropdown?

Thank you & best regards,

Jiri.

Actions #3

Updated by Jiří Křivánek about 14 years ago

Any progress about this?

Actions #4

Updated by Jiří Křivánek over 12 years ago

Any progress about this?

Actions

Also available in: Atom PDF