[%# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # This Source Code Form is "Incompatible With Secondary Licenses", as # defined by the Mozilla Public License, v. 2.0. #%] [% title = "Time Summary " %] [% IF do_depends %] [% title = title _ "for " %] [% header = "$terms.Bug $ids.0" FILTER bug_link(ids.0) FILTER none %] [% header = title _ header _ " (and $terms.bugs blocking it)" %] [% title = title _ "$terms.Bug $ids.0" %] [% 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"] doc_section = "timetracking.html" yui = ['calendar'] javascript_urls = [ "js/util.js", "js/field.js" ] %] [% INCLUDE query_form %] [% IF do_report %] [% global.grand_total = 0 global.estimated = 0 global.remaining = 0 %] [% FOREACH workdata = part_list %] [%# parts contains date ranges (from, to). %] [% 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 detailed %]

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 %]

[% END %] [% IF monthly %]

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


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

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

[% 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 %] [% 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 %] [% 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 = {} %] [% FOREACH bug = workdata.keys.nsort %] [% INCLUDE do_one_bug id=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 %] [% INCLUDE calc_bug_total id=id %] [% global.bug_count.$id = 1 %] [% INCLUDE bug_header id=id %] [% 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 %] [% "$terms.Bug $id" FILTER bug_link(id) FILTER none %] [% display_value("bug_status", bugs.$id.bug_status) FILTER html %] [% bugs.$id.short_desc FILTER html %] [% IF extra %] [% bugdata.total_time FILTER html %] [% END %] [% IF detailed %]   Estimated: [% bugs.$id.estimated_time FILTER format("%.2f") %]h Remaining: [% bugs.$id.remaining_time FILTER format("%.2f") %]h Deadline: [% bugs.$id.deadline || "Not set" %] [% IF extra %]   [% END %] [% 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 !global.deadline || bugs.$id.deadline && global.deadline.replace("-", "") < bugs.$id.deadline.replace("-", "") %] [% SET global.deadline = bugs.$id.deadline %] [% END %] [% END %] [% END %] [% BLOCK inactive_report %]

Inactive [% terms.bugs %]

[% cid = 0 %] [% FOREACH bug_id = null.nsort %] [% INCLUDE bug_header id=bug_id cid=cid %] [% cid = cid + 1 %] [% END %]
[% END %] [% BLOCK section_total %] [% IF global.total > 0 %] Totals [% additional FILTER html %] [% 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 %]