summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--template/en/default/bug/summarize-time.html.tmpl46
-rw-r--r--template/en/default/filterexceptions.pl4
2 files changed, 49 insertions, 1 deletions
diff --git a/template/en/default/bug/summarize-time.html.tmpl b/template/en/default/bug/summarize-time.html.tmpl
index 14ae68da2..12fb46e6d 100644
--- a/template/en/default/bug/summarize-time.html.tmpl
+++ b/template/en/default/bug/summarize-time.html.tmpl
@@ -38,7 +38,7 @@
[% IF do_report %]
- [% global.grand_total = 0 %]
+ [% global.grand_total = 0 global.estimated = 0 global.remaining = 0 %]
[% FOREACH workdata = part_list %]
[%# parts contains date ranges (from, to). %]
@@ -59,6 +59,16 @@
[% END %]
[% END %]
+ [% IF detailed %]
+ <h4 style="margin: 0">
+ Total of [% global.remaining FILTER format("%.2f") %]h remains from
+ original estimate of [% global.estimated FILTER format("%.2f") %]h
+ [% IF global.deadline %]
+ (deadline [% global.deadline FILTER html %])
+ [% END %]
+ </h4>
+ [% END %]
+
[% IF monthly %]
<h4 style="margin: 0">Total of [% global.grand_total FILTER format("%.2f") %] hours worked</h4>
<hr noshade size="1">
@@ -101,6 +111,7 @@
[% col = 0 subtotal = 0%]
[% FOREACH bugdata=ownerdata.nsort("bug_id") %]
[% bug_id = bugdata.bug_id %]
+ [% INCLUDE calc_bug_total id=bug_id %]
[% global.bug_count.$bug_id = 1 %]
[% IF detailed %]
[% INCLUDE bug_header cid=col id=bug_id bugdata=bugdata extra=1 %]
@@ -139,6 +150,7 @@
[% BLOCK do_one_bug %]
[% subtotal = 0.00 cid = 0 %]
+ [% INCLUDE calc_bug_total id=id %]
[% global.bug_count.$id = 1 %]
[% INCLUDE bug_header id=id %]
@@ -180,8 +192,40 @@
<td align="right" valign="top">[% bugdata.total_time FILTER html %]</td>
[% END %]
</tr>
+ [% IF detailed %]
+ <tr class="bug_header[% '2' IF cid % 2 %]">
+ <td>&nbsp;</td>
+ <td colspan="3">
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td width="33%">
+ Estimated: [% bugs.$id.estimated_time FILTER format("%.2f") %]h
+ </td>
+ <td width="33%">
+ Remaining: [% bugs.$id.remaining_time FILTER format("%.2f") %]h
+ </td>
+ <td width="33%">
+ Deadline: [% bugs.$id.deadline || "<b>Not set</b>" %]
+ </td>
+ </tr>
+ </table>
+ </td>
+ [% IF extra %]
+ <td>&nbsp;</td>
+ [% END %]
+ </tr>
+ [% END %]
[% END %]
+[% BLOCK calc_bug_total %]
+ [% IF !global.bug_count.$id %]
+ [% global.estimated = global.estimated + bugs.$id.estimated_time %]
+ [% global.remaining = global.remaining + bugs.$id.remaining_time %]
+ [% IF bugs.$id.deadline && global.deadline < bugs.$id.deadline %]
+ [% SET global.deadline = bugs.$id.deadline %]
+ [% END %]
+ [% END %]
+[% END %]
[% BLOCK inactive_report %]
<h3>Inactive [% terms.bugs %]</h3>
diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl
index ab9ff00e9..449f6290d 100644
--- a/template/en/default/filterexceptions.pl
+++ b/template/en/default/filterexceptions.pl
@@ -328,6 +328,10 @@
'subtotal FILTER format("%.2f")',
'work_time FILTER format("%.2f")',
'global.total FILTER format("%.2f")',
+ 'global.remaining FILTER format("%.2f")',
+ 'global.estimated FILTER format("%.2f")',
+ 'bugs.$id.remaining_time FILTER format("%.2f")',
+ 'bugs.$id.estimated_time FILTER format("%.2f")',
],