summaryrefslogtreecommitdiffstats
path: root/template/en/default/reports/duplicates.html.tmpl
blob: f442bd54fe015b35ed3dc8a0380c10b2e64da285 (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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<!-- 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.
  #
  # The Initial Developer of the Original Code is Netscape Communications
  # Corporation. Portions created by Netscape are
  # Copyright (C) 1998 Netscape Communications Corporation. All
  # Rights Reserved.
  #
  # Contributor(s): Gervase Markham <gerv@gerv.net>
  #%]

[%# INTERFACE:
  # bugs: list of hashes. May be empty. Each hash has nine members:
  #   id: integer. The bug number
  #   count: integer. The number of dupes
  #   delta: integer. The change in count in the last $changedsince days
  #   component: string. The bug's component
  #   bug_severity: string. The bug's severity.
  #   op_sys: string. The bug's reported OS.
  #   target_milestone: string. The bug's TM.
  #   short_desc: string. The bug's summary.
  #   bug_status: string. The bug's status.
  #   
  # bug_ids: list of integers. May be empty. The IDs of the bugs in $bugs.
  # products: list of strings. The products this user can see.
  #  
  # sortby: string. the column on which we are sorting the buglist.
  # reverse: boolean. True if we are reversing the current sort.
  # maxrows: integer. Max number of rows to display.
  # changedsince: integer. The number of days ago for the changedsince column.
  # openonly: boolean. True if we are only showing open bugs.    
  # product: string. Restrict to this product only.
  #%]
 
[% IF product %]
  [% title = "Most Frequently Reported Bugs for $product" %]
[% ELSE %]   
  [% title = "Most Frequently Reported Bugs" %]
[% END%]

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

<p>
  <a href="#explanation">What is this data?</a>
  <br>
  <a href="#params">Change parameters</a>
</p>

[%# *** Column Headers *** %]

<table border>
  <tr BGCOLOR="#CCCCCC">
    [% FOREACH column = [ { name => "id", description => "Bug #" },
                          { name => "count", description => "Dupe<br>Count" },
                          { name => "delta", 
                      description => "Change in last<br>$changedsince day(s)" },
                          { name => "component", description => "Component" },
                          { name => "bug_severity", description => "Severity" },
                          { name => "op_sys", description => "Op Sys" }, 
                          { name => "target_milestone", 
                            description => "Target<br>Milestone" },
                          { name => "short_desc", description => "Summary" } ] 
     %]
                          
      [%# Small hack to keep delta column out if we don't need it %]
      [% NEXT IF column.name == "delta" AND NOT dobefore %]                     

      <td>
        <center>
          <b>
            [% bug_ids_string = bug_ids.join(',') %]
            <a href="duplicates.cgi?sortby=[% column.name %]
              [% "&reverse=1" IF NOT reverse AND sortby == column.name %]
              [% "&maxrows=$maxrows" IF maxrows %]
              [% "&changedsince=$changedsince" IF changedsince %]
              [% "&openonly=1" IF openonly %]
              [% "&product=$product" IF product %]
              [% "&bug_id=$bug_ids_string&sortvisible=1" IF sortvisible %]">
              [% column.description %]</a>
          </b>
        </center>
      </td>
    [% END %]
  </tr>
  
[% IF NOT sortby %]
  [% sortby = "count"; reverse = "1" %]
[% END %]

[% IF sortby == "id" OR sortby == "count" OR sortby == "delta" %]
  [%# Numeric sort %]
  [% sortedbugs = bugs.nsort(sortby) %]
[% ELSE %]
  [% sortedbugs = bugs.sort(sortby) %]
[% END %]

[% IF reverse %]
  [% bugs = sortedbugs.reverse %]
[% ELSE %]
  [% bugs = sortedbugs %]
[% END %]

[%# *** Buglist *** %]

[%# We need to keep track of the bug IDs we are actually displaying, because
  # if the user decides to sort the visible list, we need to know what that
  # list actually is. %]
[% vis_bug_ids = [] %]

[% FOREACH bug = bugs %]
  [% LAST IF loop.index() >= maxrows %]
  [% vis_bug_ids.push(bug.id) %]      

  <tr>
    <td>
      <center>
        [% "<strike>" IF bug.resolution != "" %]
        <A HREF="show_bug.cgi?id=[% bug.id %]">[% bug.id %]</a>
        [% "</strike>" IF bug.resolution != "" %]
      </center>
    </td>

    <td>
      <center>
        [% bug.count %]
      </center>
    </td>

    [% IF dobefore %]
      <td><center>[% bug.delta %]</center></td>
    [% END %]

    <td>[% bug.component %]</td>
    <td><center>[% bug.bug_severity %]</center></td>
    <td><center>[% bug.op_sys %]</center></td>
    <td><center>[% bug.target_milestone %]</center></td>
    <td>[% bug.short_desc FILTER html %]</td>
  </tr>
[% END %]

</table>

<br>
<br>

[%# *** Parameters *** %]

[% bug_ids_string = vis_bug_ids.join(',') %]

<h3><a name="params">Change Parameters</a></h3>

<form method="get" action="duplicates.cgi">
  <input type="hidden" name="sortby" value="[% sortby %]" />
  <input type="hidden" name="reverse" value="[% reverse %]" />
  <input type="hidden" name="bug_id" value="[% bug_ids_string %]">
  <table>
    <tr>
      <td>When sorting or restricting,
          work with:</td>
      <td>
        <input type="radio" name="sortvisible" id="entirelist" value="0" 
          [% "checked" IF NOT sortvisible %] />         
        <label for="entirelist">
          entire list
        </label>
        <br />        
        <input type="radio" name="sortvisible" id="visiblelist" value="1" 
          [% "checked" IF sortvisible %] /> 
        <label for="visiblelist">
          currently visible list
        </label>
      </td>
      <td rowspan="4" valign="top">Restrict to products:</td>
      <td rowspan="4" valign="top">
        <select name="product" size="5" multiple>
          [% FOREACH p = products %]
            <option name="[% p %]"
            [% " selected" IF product == p %]>[% p %]</option>
          [% END %]
        </select>
      </td>
     </tr>

    <tr>
      <td>Max rows:</td>
      <td>
        <input size="4" name="maxrows" value="[% maxrows %]" />
      </td>
    </tr>

    <tr>
      <td>Change column is change in the last:</td>
      <td>
        <input size="4" name="changedsince" value="[% changedsince %]" /> days
      </td>
    </tr>

    <tr>
      <td>
        <label for="openonly">
          Open bugs only:
        </label>
      </td>
      <td>
        <input type="checkbox" name="openonly" id="openonly" value="1" 
          [% "checked" IF openonly %] />      
      </td>
    </tr>

  </table>

  <input type="submit" value="Change" /> 
</form>

<form method="post" action="buglist.cgi">
  <input type="hidden" name="bug_id" value="[% bug_ids_string %]">
  <input type="hidden" name="order" value="Reuse same sort as last time">
  Or just give this to me as a <input type="submit" value="bug list">. 
  (Note: the order may not be the same.)
</form>

<hr />

<b>
  <a name="explanation">What are "Most Frequently Reported Bugs"?</a>
</b>

<blockquote>
  The Most Frequent Bugs page lists the known open bugs which 
  are reported most frequently in recent builds of Mozilla. It is 
  automatically generated from the Bugzilla database every 24 hours, by 
  counting the number of direct and indirect duplicates of bugs.
  This information is provided in order to assist in minimizing
  the amount of duplicate bugs entered into Bugzilla which in turn cuts down
  on development time.
</blockquote>

<b>How do I use this list?</b>

<ul>
  <li>Review the most frequent bugs list.</li>
  <li>If problem is listed:</li>

  <ul>
    <li>Click on Bug # link to confirm that you have found the same bug and 
      comment if you have additional information. Or move on with your testing
      of the product.
    </li>
  </ul>

  <li>If problem not listed:</li>

  <ul>
    <li>Go to the <a href="query.cgi">Bugzilla Search</a>
      page to try and locate a similar bug that has already been written.</li>
    <li>If you find your bug in Bugzilla, feel free to comment with any new or
      additional data you may have.</li>
    <li>If you cannot find your problem already documented in Bugzilla, go to
      the
      <a href="http://www.mozilla.org/quality/help/bug-form.html">Bugzilla
        Helper</a>
      and post a new bug.</li>
  </ul>
</ul>

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