Project

General

Profile

Estimated time and spent time in issue list

Added by Sjoerd Langke over 14 years ago

Currently, when you view a version with the time tracking module enabled, Redmine shows the totals for estimated time and spent time for all issues in that version. I would like to see these totals for another selection. Therefore, I would like the time totals displayed in the issues list.

I made a plugin which shows these totals in the issue list. I would like these totals to be displayed in the sidebar, but I could not get it to update when the user changes the filter. Is there anyway to solve this?

I currently have the code below in my plugins index.rhtml. This simply shows the totals below the issue list. It doesn't look very nice. Any ideas for a better place to show these totals?

<% if @issues >
<
if User.current.allowed_to?(:view_showtime, Herve Harster) >
<div id="showtime">
<h3><
= l(:label_time_tracking) ></h3>
<
=l(:field_estimated_hours) >: <= html_hours(lwr(:label_f_hour, @issues.inject(0){|sum,issue| sum + (issue.estimated_hours or 0)})) ><br/>
<
=l(:label_spent_time) >: <= html_hours(lwr(:label_f_hour, @issues.inject(0){|sum,issue| sum + issue.spent_hours})) >
</div>
<
end >
<
end %>


    (1-1/1)