From 8b0a6508c4daa8a56d17192a9c3a1d9b53790e15 Mon Sep 17 00:00:00 2001 From: "travis%sedsystems.ca" <> Date: Tue, 1 Mar 2005 01:52:55 +0000 Subject: Bug 250410 : Time tracking summaries Patch by Christian Reis r=jpeshkin a=justdave --- template/en/default/bug/edit.html.tmpl | 7 + template/en/default/bug/summarize-time.html.tmpl | 329 +++++++++++++++++++++++ 2 files changed, 336 insertions(+) create mode 100644 template/en/default/bug/summarize-time.html.tmpl (limited to 'template/en/default/bug') diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index 58336b588..86fb4c6b6 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -419,6 +419,13 @@ size="10" maxlength="10"> + + + + Summarize time (including time for [% terms.bugs %] + blocking this [% terms.bug %]) + + [% END %] diff --git a/template/en/default/bug/summarize-time.html.tmpl b/template/en/default/bug/summarize-time.html.tmpl new file mode 100644 index 000000000..0bcaeaeb6 --- /dev/null +++ b/template/en/default/bug/summarize-time.html.tmpl @@ -0,0 +1,329 @@ +[%# 1.0@bugzilla.org %] +[%# The contents of this file are subject to the Mozilla Public + # License Version 1.1 (the "License"); you may not use this file + # except in compliance with the License. You may obtain a copy of + # the License at http://www.mozilla.org/MPL/ + # + # Software distributed under the License is distributed on an "AS + # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + # implied. See the License for the specific language governing + # rights and limitations under the License. + # + # The Original Code is the Bugzilla Bug Tracking System. + # + # Contributor(s): Christian Reis + #%] + +[% USE date %] + +[% PROCESS global/variables.none.tmpl %] + +[% title = "Time Summary " %] +[% IF do_depends %] + [% title = title _ "for " %] + [% h1 = title _ GetBugLink(ids.0, "$terms.Bug $ids.0") %] + [% title = title _ "$terms.Bug $ids.0: " %] + [% h1 = (h1 _ " (and $terms.bugs blocking it)") IF do_depends %] +[% ELSE %] + [% title = title _ "($ids.size $terms.bugs selected)" %] + [% h1 = title %] +[% END %] + +[% PROCESS global/header.html.tmpl + title = title + h1 = h1 + style_urls = ["skins/standard/summarize-time.css"] + %] + +

+ +[% IF ids.size == 0 %] + + No [% terms.bugs %] specified or visible. + +[% ELSE %] + + [% INCLUDE query_form %] + + [% IF do_report %] + + [% global.grand_total = 0 %] + +

+ [% FOREACH workdata = part_list %] + [% part = parts.shift %] +

+

+ [% IF part.0 or part.1 %] + [% part.0 OR "Up" FILTER html %] to [% part.1 OR "now" FILTER html %] + [% ELSE %] + Full summary (no period specified) + [% END %] +

+
+ [% IF group_by == "number" %] + [% INCLUDE number_report %] + [% ELSE %] + [% INCLUDE owner_report %] + [% END %] +

+ [% END %] + + [% IF monthly %] +

Total of [% global.grand_total FILTER format("%.2f") %] hours worked

+
+ [% END %] + + [% IF null.keys.size > 0 %] + [% INCLUDE inactive_report %] +

+

Total of [% null.keys.size %] + inactive [% terms.bugs %]

+ [% END %] + + [% END %] + +[% END %] +

+ +[% PROCESS global/footer.html.tmpl %] + +[%# + # + # Developer reporting + # + #%] + +[% BLOCK owner_report %] + [% global.total = 0 global.bug_count = {} global.owner_count = {}%] + + [% FOREACH owner = workdata.keys.sort %] + [% INCLUDE do_one_owner owner=owner ownerdata=workdata.$owner + detailed=detailed %] + [% END %] + + [% additional = "$global.owner_count.size developers @ + $global.bug_count.size $terms.bugs" %] + [% INCLUDE section_total colspan=3 additional=additional %] +
+[% END %] + +[% BLOCK do_one_owner %] + [% global.owner_count.$owner = 1 %] + + [% owner FILTER html %] + + [% col = 0 subtotal = 0%] + [% FOREACH bugdata=ownerdata.nsort("bug_id") %] + [% bug_id = bugdata.bug_id %] + [% global.bug_count.$bug_id = 1 %] + [% IF detailed %] + [%# XXX oy what a hack %] + [% timerow = '' _ bugdata.total_time _ '' %] + [% INCLUDE bug_header cid=col id=bug_id bug_status=bugdata.bug_status + short_desc=bugdata.short_desc extra=timerow %] + [% col = col + 1 %] + [% END %] + [% subtotal = subtotal + bugdata.total_time %] + [% END %] + +   + + Total: + + + [% subtotal FILTER format("%.2f") %] + [% global.total = global.total + subtotal %] + +[% END %] + +[%# + # + # Bug Number reporting + # + #%] + +[% BLOCK number_report %] + [% global.total = 0 global.owner_count = {} global.bug_count = {} %] + + + [% keys = sort_bug_keys(workdata.keys) %] + [% FOREACH bug = keys %] + [% INCLUDE do_one_bug bug=bug bugdata=workdata.$bug + detailed=detailed %] + [% END %] + + [% additional = "$global.bug_count.size $terms.bugs & + $global.owner_count.size developers" %] + [% INCLUDE section_total additional=additional colspan=2 %] +
+[% END %] + +[% BLOCK do_one_bug %] + [% subtotal = 0.00 cid = 0 %] + + [%# hack apart the ID and summary. Sad. %] + [% items = bug.split(";") %] + [% id = items.shift %] + [% status = items.shift %] + [% global.bug_count.$id = 1 %] + [% INCLUDE bug_header id=id bug_status=status short_desc=items.join(";") %] + + [% FOREACH owner = bugdata.sort("login_name") %] + [% work_time = owner.total_time %] + [% subtotal = subtotal + work_time %] + [% login_name = owner.login_name %] + [% global.owner_count.$login_name = 1 %] + [% IF detailed %] + [% cid = cid + 1 %] + +   + [% login_name FILTER html %] + + [% work_time FILTER format("%.2f") %] + + [% END %] + [% END %] + +   + + Total: + + + [% subtotal FILTER format("%.2f") %] + + [% global.total = global.total + subtotal %] +[% END %] + +[% BLOCK bug_header %] + + + [% INCLUDE buglink id=id %] + [% bug_status FILTER html %] + [% short_desc FILTER html %] + [% extra FILTER none %] + +[% END %] + + +[% BLOCK inactive_report %] +

Inactive [% terms.bugs %]

+ + [% cid = 0 %] + [% FOREACH bug_id = null.keys.nsort %] + [% INCLUDE bug_header id=bug_id bug_status=null.$bug_id.1 + short_desc=null.$bug_id.0 cid=cid %] + [% cid = cid + 1 %] + [% END %] +
+[% END %] + + +[% BLOCK section_total %] + [% IF global.total > 0 %] + + + Totals + [% additional FILTER none %] +    + [% global.total FILTER format("%.2f") %] + + [% ELSE %] + + No time allocated during the specified period. + + [% END %] + [% global.grand_total = global.grand_total + global.total %] +[% END %] + +[%# + # + # The query form + # + #%] + +[% BLOCK query_form %] +
+
+ + + + +[% IF warn_swap_dates %] +

The + end date specified occurs before the start date, which doesn't + make sense; the dates below have therefore been swapped.

+[% END %] + + + + + + + + +
+ Period : + + +   + and : + + + +
  + (Dates are optional, and in YYYY-MM-DD format) +
+ Group by: + + + + + Format: +
  + + [%# XXX: allow splitting by other intervals %] +   + +   + +
+ +
+ +
+[% END %] + +[%# + # + # Utility + # + #%] + +[% BLOCK buglink %] + [% terms.Bug %] [% id FILTER html %] +[% END %] + -- cgit v1.2.3-24-g4f1b