[%# 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 " %] [% header = title _ "$terms.Bug $ids.0" FILTER bug_link(ids.0) FILTER none %] [% title = title _ "$terms.Bug $ids.0: " %] [% header = (header _ " (and $terms.bugs blocking it)") IF do_depends %] [% ELSE %] [% title = title _ "($ids.size $terms.bugs selected)" %] [% header = title %] [% END %] [% PROCESS global/header.html.tmpl title = title header = header 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 %]
:   and :
  (Dates are optional, and in YYYY-MM-DD format)
Group by: :
  [%# XXX: allow splitting by other intervals %]    

[% END %] [%# # # Utility # #%] [% BLOCK buglink %] [% terms.Bug %] [% id FILTER html %] [% END %]