summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en/default/pages/triage_reports.html.tmpl
blob: b0ca7e30d25dc1c9faaa7b8c97924438129dbdb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
[%# 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 BMO Extension
  #
  # The Initial Developer of the Original Code is the Mozilla Foundation
  # Portions created by the Initial Developers are Copyright (C) 2011 the
  # Initial Developer. All Rights Reserved.
  #
  # Contributor(s):
  #   Byron Jones <bjones@mozilla.com>
  #%]

[% PROCESS global/variables.none.tmpl %]

[% js_data = BLOCK %]
var useclassification = false;
var first_load = true;
var last_sel = [];
var cpts = new Array();
[% n = 1 %]
[% FOREACH p = user.get_selectable_products %]
  cpts['[% n FILTER js %]'] = [
    [%- FOREACH c = p.components %]'[% c.name FILTER js %]'[% ", " UNLESS loop.last %] [%- END -%] ];
  [% n = n+1 %]
[% END %]

var selected_components = [
  [%- FOREACH c = input.component %]'[% c FILTER js %]'
  [%- ',' UNLESS loop.last %] [%- END ~%] ];

[% END %]

[% INCLUDE global/header.html.tmpl
  title = "Triage Reports"
  generate_api_token = 1
  yui = [ 'calendar' ]
  javascript = js_data
  javascript_urls = [ "js/util.js", "js/field.js", "js/productform.js",
                      "extensions/BMO/web/js/triage_reports.js" ]
  style_urls = [ "skins/standard/buglist.css",
                 "extensions/BMO/web/styles/triage_reports.css" ]
%]

<noscript>
<h2>Javascript is required to use this report.</h2>
</noscript>

[% PROCESS "global/field-descs.none.tmpl" %]

<form id="activity_form" name="activity_form" action="page.cgi" method="get"
      onSubmit="return onGenerateReport()">
<input type="hidden" name="id" value="triage_reports.html">
<input type="hidden" name="action" value="run">

Show UNCONFIRMED [% terms.bugs %] with:
<table id="triage_form">

<tr>
  <th>Product:</th>
  <td>
    <select name="product" id="product" onChange="onSelectProduct()">
      <option value=""></option>
      [% FOREACH p = user.get_selectable_products %]
        <option value="[% p.name FILTER html %]"
          [% " selected" IF input.product == p.name %]>
          [% p.name FILTER html %]
        </option>
      [% END %]
    </select>
  </td>
  <td rowspan="2" valign="top">
    <b>Comment:</b><br>

    <input type="checkbox" name="filter_commenter" id="filter_commenter" value="1"
    [% 'checked' IF input.filter_commenter %]>
    <label for="filter_commenter">where the last commenter</label>
    <select name="commenter" id="commenter" onChange="onCommenterChange()">
      <option value="reporter" [% 'selected' IF input.commenter == 'reporter' %]>is the reporter</option>
      <option value="noconfirm" [% 'selected' IF input.commenter == 'noconfirm' %]>does not have canconfirm</option>
      <option value="is" [% 'selected' IF input.commenter == 'is' %]>is</option>
    </select>
    [%+ INCLUDE global/userselect.html.tmpl
       id => "commenter_is"
       name => "commenter_is"
       value => input.commenter_is
       size => 20
       emptyok => 0
       classes = input.commenter == "is" ? "" : "hidden"
    %]
    <br>

    <input type="checkbox" name="filter_last" id="filter_last" value="1"
    [% 'checked' IF input.filter_last %]>
    <label for="filter_last">where the last comment is older than</label>
    <select name="last" id="last" onChange="onLastChange()">
      <option value="30" [% 'selected' IF input.last == '30' %]>30 days</option>
      <option value="60" [% 'selected' IF input.last == '60' %]>60 days</option>
      <option value="90" [% 'selected' IF input.last == '90' %]>90 days</option>
      <option value="365" [% 'selected' IF input.last == '365' %]>one year</option>
      <option value="is" [% 'selected' IF input.last == 'is' %]>the date</option>
    </select>
    <span id="last_is_span" class="[% 'hidden' IF input.last != 'is' %]">
      <input type="text" id="last_is" name="last_is" size="11" maxlength="10"
             value="[% input.last_is FILTER html %]"
             onChange="updateCalendarLastIs(this)">
      <button type="button" class="calendar_button" id="button_calendar_last_is"
              onClick="showCalendar('last_is')"><span>Calendar</span>
      </button>
      <div id="con_calendar_last_is"></div>
    </span>
    <br>
  </td>
</tr>

<tr>
  <th>Component:</th>
  <td>
    <select name="component" id="component" multiple size="5">
    </select>
  </td>
</tr>

<tr>
  <td>&nbsp;</td>
  <td>
    <input type="submit" value="Generate Report">
  </td>
</tr>

</table>

</form>
<script>
  createCalendar('last_is');
</script>

[% IF input.action == 'run' %]
<hr>
[% IF bugs.size > 0 %]
  <p>
    Found [% bugs.size %] [%+ terms.bug %][% 's' IF bugs.size != 1 %]:
  </p>
  <table border="0" cellspacing="0" id="report" width="100%">
    <tr id="report-header">
      <th>[% terms.Bug %] / Date</th>
      <th>Summary</th>
      <th>Reporter / Commenter</th>
      <th>Comment Date</th>
      <th>Last Comment</th>
    </tr>

    [% FOREACH bug = bugs %]
      [% count = loop.count() %]
      <tr class="bz_bugitem [% count % 2 == 1 ? "bz_row_odd" : "bz_row_even" %]">
        <td>
          [% bug.id FILTER bug_link(bug.id) FILTER none %]<br>
          [% bug.creation_ts.replace(' .*' '') FILTER html FILTER no_break %]
        </td>
        <td>
          [% bug.summary FILTER html %]
        </td>
        <td>
          [% INCLUDE global/user.html.tmpl who = bug.reporter %]
          [% IF bug.commenter.id != bug.reporter.id %]
          <br>[% INCLUDE global/user.html.tmpl who = bug.commenter %]
          [% END %]
        </td>
        <td>
          [% bug.comment_ts FILTER html FILTER no_break %]
        </td>
        <td>
          [% bug.comment FILTER html %]
        </td>
      </tr>
    [% END %]
  </table>

  <p>
    <a href="buglist.cgi?bug_id=
    [%- FOREACH bug = bugs %][% bug.id FILTER uri %],[% END -%]
    ">Show as a [% terms.Bug %] List</a>
  </p>

[% ELSE %]
  <p>
    No [% terms.bugs %] found.
  </p>
[% END %]

[% END %]

[% INCLUDE global/footer.html.tmpl %]