Merge lp:~brian-murray/arsenal/most-duplicates into lp:~bryce/arsenal/2.x

Proposed by Brian Murray
Status: Merged
Merge reported by: Bryce Harrington
Merged at revision: not available
Proposed branch: lp:~brian-murray/arsenal/most-duplicates
Merge into: lp:~bryce/arsenal/2.x
Diff against target: 681 lines (+638/-4)
4 files modified
reports/most-dupes/most-dupes.json (+34/-0)
scripts/collect-bug-data (+20/-3)
scripts/reporter (+1/-1)
web/templates/bugs-by-team-dupe-count.mako (+583/-0)
To merge this branch: bzr merge lp:~brian-murray/arsenal/most-duplicates
Reviewer Review Type Date Requested Status
Bryce Harrington Approve
Review via email: mp+106051@code.launchpad.net

Description of the change

add in a json file for most-dupes and a new template file that will show the dupe count

additionally and in some more parameters to collect-bug-data to utilize order_by in searchTasks and limit the quantity so you could get the 50 newest bugs or the 100 bugs with the most duplicates.

To post a comment you must log in.
Revision history for this message
Bryce Harrington (bryce) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'reports/most-dupes'
=== added file 'reports/most-dupes/most-dupes.json'
--- reports/most-dupes/most-dupes.json 1970-01-01 00:00:00 +0000
+++ reports/most-dupes/most-dupes.json 2012-05-16 20:40:24 +0000
@@ -0,0 +1,34 @@
1{
2 "launchpad_config": {
3 "launchpad_client_name": "rls-mgr-reports",
4 "read_only": false
5 },
6 "search_criteria": [
7 {
8 "distribution": "ubuntu",
9 "limit": 50,
10 "order_by": "-number_of_duplicates",
11 "series": [
12 "precise",
13 "NONE"
14 ],
15 "status": [
16 "New",
17 "Confirmed",
18 "Triaged",
19 "Incomplete",
20 "Incomplete (with response)",
21 "Incomplete (without response)",
22 "In Progress",
23 "Fix Committed"
24 ],
25 "tags": [
26 "precise"
27 ]
28 }
29 ],
30 "report": {
31 "show_total_bugs": true,
32 "title": ""
33 }
34}
035
=== modified file 'scripts/collect-bug-data'
--- scripts/collect-bug-data 2012-05-02 19:22:01 +0000
+++ scripts/collect-bug-data 2012-05-16 20:40:24 +0000
@@ -307,6 +307,16 @@
307 Dbg.verbose('search: status: \'%s\'\n' % ','.join(search_status))307 Dbg.verbose('search: status: \'%s\'\n' % ','.join(search_status))
308308
309 try:309 try:
310 search_order = search_criteria['order_by']
311 except KeyError:
312 search_order = ''
313
314 try:
315 search_limit = search_criteria['limit']
316 except KeyError:
317 search_limit = ''
318
319 try:
310 reporters = search_criteria['reporters']320 reporters = search_criteria['reporters']
311 except KeyError:321 except KeyError:
312 reporters = ''322 reporters = ''
@@ -394,9 +404,16 @@
394 tasks.append(task)404 tasks.append(task)
395 return tasks405 return tasks
396 else:406 else:
397 return distro.search_tasks(tags=search_tags,407 if search_limit == '':
398 tags_combinator=search_tags_combinator, status=search_status,408 return distro.search_tasks(tags=search_tags,
399 modified_since=last_run_time)409 tags_combinator=search_tags_combinator,
410 status=search_status, modified_since=last_run_time,
411 order_by=search_order)
412 else:
413 return distro.search_tasks(tags=search_tags,
414 tags_combinator=search_tags_combinator,
415 status=search_status, modified_since=last_run_time,
416 order_by=search_order)[:search_limit]
400417
401 # main418 # main
402 #419 #
403420
=== modified file 'scripts/reporter'
--- scripts/reporter 2012-03-27 03:38:34 +0000
+++ scripts/reporter 2012-05-16 20:40:24 +0000
@@ -239,7 +239,7 @@
239 for bug_task in bd['tasks'][bid]:239 for bug_task in bd['tasks'][bid]:
240 task = {}240 task = {}
241 task['bug'] = {}241 task['bug'] = {}
242 for k in ['title', 'series_name', 'number_of_messages', 'number_subscribed', 'number_affected', 'iso_date_created', 'last_update', 'series_version']:242 for k in ['title', 'series_name', 'number_of_messages', 'number_subscribed', 'number_affected', 'iso_date_created', 'last_update', 'series_version', 'number_of_duplicates']:
243 # in the event that a key doesn't exist in the json file set it to ''243 # in the event that a key doesn't exist in the json file set it to ''
244 try:244 try:
245 task['bug'][k] = bug_task['bug'][k]245 task['bug'][k] = bug_task['bug'][k]
246246
=== added file 'web/templates/bugs-by-team-dupe-count.mako'
--- web/templates/bugs-by-team-dupe-count.mako 1970-01-01 00:00:00 +0000
+++ web/templates/bugs-by-team-dupe-count.mako 2012-05-16 20:40:24 +0000
@@ -0,0 +1,583 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<%
3 importance_color = {
4 "Unknown" : "importance-unknown",
5 "Critical" : "importance-critical",
6 "High" : "importance-high",
7 "Medium" : "importance-medium",
8 "Low" : "importance-low",
9 "Wishlist" : "importance-wishlist",
10 "Undecided" : "importance-undecided"
11 }
12 status_color = {
13 "New" : "status-new",
14 "Incomplete" : "status-incomplete",
15 "Confirmed" : "status-confirmed",
16 "Triaged" : "status-triaged",
17 "In Progress" : "status-in_progress",
18 "Fix Committed" : "status-fix_committed",
19 "Fix Released" : "status-fix_released",
20 "Invalid" : "status-invalid",
21 "Won't Fix" : "status-wont_fix",
22 "Opinion" : "status-opinion",
23 "Expired" : "status-expired",
24 "Unknown" : "status-unknown"
25 }
26
27 bugs_by_team = {}
28 tasks = template_data['tasks']
29 for bid in tasks:
30 for t in tasks[bid]:
31 team = 'unknown' if t['team'] == '' else t['team']
32
33 if team not in bugs_by_team:
34 bugs_by_team[team] = {}
35
36 if bid not in bugs_by_team[team]:
37 bugs_by_team[team][bid] = []
38
39 if t['bug_target_name'] not in bugs_by_team[team][bid]:
40 bugs_by_team[team][bid].append(t['bug_target_name'])
41
42 team_report_order = []
43 if 'unknown' in bugs_by_team:
44 team_report_order.append('unknown') # We want unknown first
45 for t in sorted(bugs_by_team):
46 if t != 'unknown':
47 team_report_order.append(t)
48
49 report_options = template_data['report']
50%>
51<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
52 <head>
53 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
54 <title>${report_title}</title>
55
56 <link title="light" rel="stylesheet" href="http://people.canonical.com/~kernel/reports/css/light-style.css" type="text/css" media="print, projection, screen" />
57 <link title="dark" rel="stylesheet" href="http://people.canonical.com/~kernel/reports/css/dark-style.css" type="text/css" media="print, projection, screen" />
58
59 <script type="text/javascript" src="http://people.canonical.com/~kernel/reports/js/styleswitcher.js"></script>
60
61 <link href='http://fonts.googleapis.com/css?family=Cantarell&subset=latin' rel='stylesheet' type='text/css'>
62 <script type="text/javascript" src="http://people.canonical.com/~kernel/reports/js/jquery-latest.js"></script>
63 <script type="text/javascript" src="http://people.canonical.com/~kernel/reports/js/jquery.tablesorter.js"></script>
64
65 </head>
66
67
68 <body class="bugbody">
69 <!-- Top Panel -->
70 <div id="toppanel">
71 <!-- Sliding Panel
72 -->
73 <div id="panel">
74 <form name="filter">
75 <div class="content clearfix">
76
77 <table width="100%">
78 <tr valign="top">
79 <td valign="top" width="30%">
80 <p class="l2-section-heading">Importance</p>
81 <table width="100%">
82 <tr><td width="50%"> <input type="checkbox" name="importance" onclick="importance_handler(this, 'importance', true)" checked value="Critical" /> Critical </td>
83 <td width="50%"> <input type="checkbox" name="importance" onclick="importance_handler(this, 'importance', true)" checked value="Low" /> Low </td></tr>
84 <tr><td width="50%"> <input type="checkbox" name="importance" onclick="importance_handler(this, 'importance', true)" checked value="High" /> High </td>
85 <td width="50%"> <input type="checkbox" name="importance" onclick="importance_handler(this, 'importance', true)" checked value="Wishlist" /> Wishlist </td></tr>
86 <tr><td width="50%"> <input type="checkbox" name="importance" onclick="importance_handler(this, 'importance', true)" checked value="Medium" /> Medium </td>
87 <td width="50%"> <input type="checkbox" name="importance" onclick="importance_handler(this, 'importance', true)" checked value="Undecided" /> Undecided </td></tr>
88 </table>
89 </td>
90
91 <td width="20">&nbsp;</td>
92
93 <td valign="top">
94 <p class="l2-section-heading">Status</p>
95 <table width="100%">
96 <tr><td width="50%"> <input type="checkbox" name="status" onclick="status_handler(this, 'status', true)" checked value="New" /> New </td>
97 <td width="50%"> <input type="checkbox" name="status" onclick="status_handler(this, 'status', true)" checked value="Incomplete" /> Incomplete </td></tr>
98 <tr><td width="50%"> <input type="checkbox" name="status" onclick="status_handler(this, 'status', true)" checked value="Confirmed" /> Confirmed </td>
99 <td width="50%"> <input type="checkbox" name="status" onclick="status_handler(this, 'status', true)" checked value="Fix Released" /> Fix Released </td></tr>
100 <tr><td width="50%"> <input type="checkbox" name="status" onclick="status_handler(this, 'status', true)" checked value="Triaged" /> Triaged </td>
101 <td width="50%"> <input type="checkbox" name="status" onclick="status_handler(this, 'status', true)" checked value="Won't Fix" /> Won't Fix </td></tr>
102 <tr><td width="50%"> <input type="checkbox" name="status" onclick="status_handler(this, 'status', true)" checked value="In Progress" /> In Progress </td>
103 <td width="50%"> <input type="checkbox" name="status" onclick="status_handler(this, 'status', true)" checked value="Opinion" /> Opinion </td></tr>
104 <tr><td width="50%"> <input type="checkbox" name="status" onclick="status_handler(this, 'status', true)" checked value="Fix Committed" /> Fix Committed </td>
105 <td width="50%"> <input type="checkbox" name="status" onclick="status_handler(this, 'status', true)" checked value="Invalid" /> Invalid </td></tr>
106 </table>
107 </td>
108
109 <td width="20">&nbsp;</td>
110
111 <td valign="top" width="30%">
112 <p class="l2-section-heading">Series</p>
113 <table width="100%">
114 <tr><td width="50%"> <input type="checkbox" name="series" onclick="series_handler(this, 'series', true)" checked value="precise" /> Precise </td>
115 <td width="50%"> <input type="checkbox" name="series" onclick="series_handler(this, 'series', true)" checked value="jaunty" /> Jaunty </td></tr>
116 <tr><td width="50%"> <input type="checkbox" name="series" onclick="series_handler(this, 'series', true)" checked value="oneiric" /> Oneiric </td>
117 <td width="50%"> <input type="checkbox" name="series" onclick="series_handler(this, 'series', true)" checked value="karmic" /> Karmic </td></tr>
118 <tr><td width="50%"> <input type="checkbox" name="series" onclick="series_handler(this, 'series', true)" checked value="natty" /> Natty </td>
119 <td width="50%"> <input type="checkbox" name="series" onclick="series_handler(this, 'series', true)" checked value="hardy" /> Hardy </td></tr>
120 <tr><td width="50%"> <input type="checkbox" name="series" onclick="series_handler(this, 'series', true)" checked value="maverick" /> Maverick </td>
121 <td width="50%"> <input type="checkbox" name="series" onclick="series_handler(this, 'series', true)" checked value="" /> Unknown </td></tr>
122 <tr><td width="50%"> <input type="checkbox" name="series" onclick="series_handler(this, 'series', true)" checked value="lucid" /> Lucid </td></tr>
123 </table>
124 </td>
125
126 </tr>
127
128 <!--
129 <tr valign="top">
130
131 <td valign="top" width="30%" colspan="5">
132 <p class="l2-section-heading">Assignee</p>
133 <table width="100%">
134 % for i, elem in enumerate(assignees_list):
135 % if i % 5 == 0:
136 <tr>
137 % endif
138 <td width="20%"> <input type="checkbox" name="assignees" onclick="assignee_handler(this, 'series', true)" checked value="${assignees_list[i]}" /> ${assignees_list[i]} </td>
139 % if i % 5 == 4:
140 </tr>
141 % endif
142 % endfor
143 </table>
144 </td>
145 </tr>
146
147 <tr valign="top">
148
149 <td valign="top">
150 <p class="l2-section-heading">Date</p>
151 <table width="100%">
152 <tr><td colspan="4">Created within:</td></tr>
153 <tr><td width="10">&nbsp;</td>
154 <td width="50"> <input type="radio" name="date" onclick="date_handler(this, 'date', true)" checked value="1" /> 24 Hrs. </td>
155 <td width="50"> <input type="radio" name="date" onclick="date_handler(this, 'date', true)" checked value="7" /> 1 Week </td>
156 <td width="50"> <input type="radio" name="date" onclick="date_handler(this, 'date', true)" checked value="30" /> 1 Month </td></tr>
157 <tr><td width="10">&nbsp;</td>
158 <td width="50"> <input type="radio" name="date" onclick="date_handler(this, 'date', true)" checked value="-1" /> Unlimited </td></tr>
159 </table>
160 </td>
161
162 <td width="20">&nbsp;</td>
163
164 <td valign="top">
165 &nbsp;
166 </td>
167
168 <td width="20">&nbsp;</td>
169
170 <td valign="top">
171 &nbsp;
172 </td>
173 </tr>
174 -->
175
176 </table>
177
178 </div>
179 </form>
180
181 <div style="clear:both;"></div>
182 </div> <!-- panel -->
183
184 <!-- The tab on top -->
185 <div class="tab">
186 <ul class="login">
187 <li class="left">&nbsp;</li>
188 <li id="toggle">
189 <a id="open" class="open" href="#">&nbsp;Options</a>
190 <a id="close" style="display: none;" class="close" href="#">&nbsp;Close&nbsp;&nbsp;</a>
191 </li>
192 <li class="right">&nbsp;</li>
193 </ul>
194 </div> <!-- / top -->
195 </div> <!-- Top Panel -->
196
197 <div class="outermost">
198 <div class="title">
199 ${report_title}
200 </div>
201 <div class="section">
202 % for team in team_report_order:
203 % if 'show_total_bugs_per_team' in report_options and report_options['show_total_bugs_per_team']:
204 <% total = len(bugs_by_team[team].keys()) %>
205 <div class="section-heading">${team}&nbsp;&nbsp;(<span id="${team}-total">${total}</span>)</div>
206 % else:
207 <div class="section-heading">${team}</div>
208 % endif
209
210 <% id = team.replace(' ', '_') %>
211 <table id="${id}" class="tablesorter" border="0" cellpadding="0" cellspacing="1" width="100%%">
212 <thead>
213 <tr>
214 <th width="40">Bug</th>
215 <th>Summary</th>
216 <th width="100">Package</th>
217 <th width="80">Importance</th>
218 <th width="80">Status</th>
219 <th width="140">Assignee</th>
220 <th width="60">Found</th>
221 <th width="60">Target</th>
222 <th width="100">Duplicates</th>
223 </tr>
224 </thead>
225 <tbody>
226 </tbody>
227 </table>
228 % endfor
229
230 </div>
231 <br />
232 <br />
233 <div>
234 % if 'show_total_bugs' in report_options and report_options['show_total_bugs']:
235 <div id="bug-total">Total: 000</div>
236 % endif
237
238 </div>
239 <div>
240 <br />
241 <hr />
242 <table width="100%%" cellspacing="0" cellpadding="0">
243 <thead>
244 <tr>
245 <td width="100">Column</td>
246 <td>Description</td>
247 </tr>
248 </th>
249 <tbody>
250 <tr><td>Bug </td><td>The Launchpad Bug number and a link the the Launchpad Bug. </td></tr>
251 <tr><td>Summary </td><td>The 'summary' or 'title' from the bug. </td></tr>
252 <tr><td>Package </td><td>The package a bug task was created for relating to the specific bug. </td></tr>
253 <tr><td>Importance</td><td>The bug task's importance. </td></tr>
254 <tr><td>Status </td><td>The bug task's status. </td></tr>
255 <tr><td>Assignee </td><td>The person or team assigned to work on the bug. </td></tr>
256 <tr><td>Found </td><td>The milestone during which the bug was found. </td></tr>
257 <tr><td>Target </td><td>The milestone the bug task is targeted to be fixed. </td></tr>
258 <tr><td>Duplicates</td><td>Quantity of duplicate bug reports. </td></tr>
259 </tbody>
260 </table>
261 <br />
262 </div>
263 <div>
264 <br />
265 <hr />
266 <table width="100%%" cellspacing="0" cellpadding="0">
267 <tr>
268 <td>
269 ${timestamp}
270 </td>
271 <td align="right">
272 &nbsp;
273 Themes:&nbsp;&nbsp;
274 <a href='#' onclick="setActiveStyleSheet('dark'); return false;">DARK</a>
275 &nbsp;
276 <a href='#' onclick="setActiveStyleSheet('light'); return false;">LIGHT</a>
277 </td>
278 </tr>
279 </table>
280 <br />
281 </div>
282
283
284 </div> <!-- Outermost -->
285 </body>
286
287 <script type="text/javascript">
288 // add parser through the tablesorter addParser method
289 $.tablesorter.addParser({
290 // set a unique id
291 id: 'age',
292 is: function(s) { return false; },
293 format: function(s) {
294 // format your data for normalization
295 fields = s.split('.')
296 days = parseInt(fields[0], 10) * (60 * 24);
297 hours = parseInt(fields[1], 10) * 60;
298 minutes = parseInt(fields[2]);
299 total = minutes + hours + days
300 return total;
301 },
302 // set type, either numeric or text
303 type: 'numeric'
304 });
305
306 // add parser through the tablesorter addParser method
307 $.tablesorter.addParser({
308 // set a unique id
309 id: 'importance',
310 is: function(s) { return false; },
311 format: function(s) {
312 // format your data for normalization
313 return s.toLowerCase().replace(/critical/,6).replace(/high/,5).replace(/medium/,4).replace(/low/,3).replace(/wishlist/,2).replace(/undecided/,1).replace(/unknown/,0);
314 },
315 // set type, either numeric or text
316 type: 'numeric'
317 });
318
319 // add parser through the tablesorter addParser method
320 $.tablesorter.addParser({
321 // set a unique id
322 id: 'status',
323 is: function(s) { return false;
324 },
325 format: function(s) {
326 // format your data for normalization
327 return s.toLowerCase().replace(/new/,12).replace(/incomplete/,11).replace(/confirmed/,10).replace(/triaged/,9).replace(/in progress/,8).replace(/fix committed/,7).replace(/fix released/,6).replace(/invalid/,5).replace(/won't fix/,4).replace(/confirmed/,3).replace(/opinion/,2).replace(/expired/,1).replace(/unknown/,0);
328 },
329 // set type, either numeric or text
330 type: 'numeric'
331 });
332 $(function() {
333 % for team in team_report_order:
334 <% id = team.replace(' ', '_') %>
335 $("#${id}").tablesorter({
336 headers: {
337 3: {
338 sorter:'importance'
339 },
340 4: {
341 sorter:'status'
342 }
343 },
344 widgets: ['zebra']
345 });
346 % endfor
347 });
348 </script>
349
350 <script type="text/javascript">
351 var series = ["precise", "jaunty", "oneiric", "karmic", "natty", "hardy", "maverick", "lucid", ""];
352 var importance = ["Critical", "Low", "High", "Wishlist", "Medium", "Undecided"];
353 var task_status = ["New", "Incomplete", "Confirmed", "Fix Released", "Triaged", "Won't Fix", "In Progress", "Opinion", "Fix Committed", "Invalid"];
354 var assignees = [];
355 var date_filter = -1;
356 var jd = ${json_data_string};
357 var first_time = true;
358
359 var importance_color = {
360 "Unknown" : "importance-unknown",
361 "Critical" : "importance-critical",
362 "High" : "importance-high",
363 "Medium" : "importance-medium",
364 "Low" : "importance-low",
365 "Wishlist" : "importance-wishlist",
366 "Undecided" : "importance-undecided"
367 };
368
369 var status_color = {
370 "New" : "status-new",
371 "Incomplete" : "status-incomplete",
372 "Confirmed" : "status-confirmed",
373 "Triaged" : "status-triaged",
374 "In Progress" : "status-in_progress",
375 "Fix Committed" : "status-fix_committed",
376 "Fix Released" : "status-fix_released",
377 "Invalid" : "status-invalid",
378 "Won't Fix" : "status-wont_fix",
379 "Opinion" : "status-opinion",
380 "Expired" : "status-expired",
381 "Unknown" : "status-unknown"
382 };
383
384 var teams_id_list = [];
385 var teams_name_list = [];
386 % for team in team_report_order:
387 <% id = team.replace(' ', '_') %>
388 teams_id_list.push("${id}");
389 teams_name_list.push("${team}");
390 % endfor
391
392 function series_handler(chkbx, grp, update_table) {
393 series = [];
394 for (i = 0; i < document.filter.length; i++) {
395 if (document.filter[i].name == "series") {
396 if (document.filter[i].checked) {
397 series.push(document.filter[i].value);
398 }
399 }
400 }
401
402 if (update_table) {
403 update_tables();
404 }
405 }
406
407 function importance_handler(chkbx, grp, update_table) {
408 importance = [];
409 for (i = 0; i < document.filter.length; i++) {
410 if (document.filter[i].name == "importance") {
411 if (document.filter[i].checked) {
412 importance.push(document.filter[i].value);
413 }
414 }
415 }
416
417 if (update_table) {
418 update_tables();
419 }
420 }
421
422 function assignee_handler(chkbx, grp, update_table) {
423 assignees = [];
424 for (i = 0; i < document.filter.length; i++) {
425 if (document.filter[i].name == "assignees") {
426 if (document.filter[i].checked) {
427 assignees.push(document.filter[i].value);
428 }
429 }
430 }
431
432 if (update_table) {
433 update_tables();
434 }
435 }
436
437 function status_handler(chkbx, grp, update_table) {
438 task_status = [];
439 for (i = 0; i < document.filter.length; i++) {
440 if (document.filter[i].name == "status") {
441 if (document.filter[i].checked) {
442 task_status.push(document.filter[i].value);
443 }
444 }
445 }
446
447 if (update_table) {
448 update_tables();
449 }
450 }
451
452 function date_handler(chkbx, grp, update_table) {
453 date_filter = -1;
454 for (i = 0; i < document.filter.length; i++) {
455 if (document.filter[i].name == "date") {
456 if (document.filter[i].checked) {
457 date_filter = parseInt(document.filter[i].value);
458 }
459 }
460 }
461
462 if (update_table) {
463 update_tables();
464 }
465 }
466
467 function update_tables() {
468 var bug_total = 0;
469 var tables = {
470 % for team in team_report_order:
471 "${team}" : "",
472 % endfor
473 };
474 var totals = {
475 % for team in team_report_order:
476 "${team}" : 0,
477 % endfor
478 };
479
480 var oddness = {
481 % for team in team_report_order:
482 "${team}" : true,
483 % endfor
484 };
485
486 $.each(jd, function(bid, tasks) {
487 $.each(tasks, function(index, task) {
488 var fail = false;
489
490 if (series.indexOf(task.bug.series_name) == -1) {
491 fail = true;
492 }
493
494 if (!fail && importance.indexOf(task.importance) == -1) {
495 fail = true;
496 }
497
498 if (!fail && task_status.indexOf(task.status) == -1) {
499 fail = true;
500 }
501
502 /*
503 if (!fail && assignees.indexOf(task.assignee) == -1) {
504 fail = true;
505 }
506
507 if (!fail && date_filter != -1) {
508 if (task.bug.age > date_filter) {
509 fail = true;
510 }
511 }
512 */
513
514 s = "";
515 if (!fail) {
516 bug_total++;
517 if (oddness[task.team]) {
518 s += "<tr class=\"odd\">";
519 oddness[task.team] = false;
520 } else {
521 s += "<tr class=\"even\">";
522 oddness[task.team] = true;
523 }
524 s += "<td><a href=\"http://launchpad.net/bugs/" + bid + "\">" + bid + "</a></td>";
525 s += "<td>" + task.bug.title + "</td>";
526 s += "<td>" + task.task_name + "</td>";
527 s += "<td class=\"" + importance_color[task.importance] + "\">" + task.importance + "</td>";
528 s += "<td class=\"" + status_color[task.status] + "\">" + task.status + "</td>";
529 s += "<td>" + task.assignee + "</td>";
530 s += "<td>" + task.milestone_found + "</td>";
531 s += "<td>" + task.milestone_target + "</td>";
532 s += "<td>" + task.bug.number_of_duplicates + "</td>";
533 s += "</tr>";
534 tables[task.team] += s;
535 totals[task.team]++;
536 }
537 });
538 });
539
540 $.each(tables, function(team, val) {
541 id = team.replace(/ /g, '_');
542 $("#" + id + " tbody").html(tables[team]);
543 $("#" + id).trigger("update");
544 % if 'show_total_bugs_per_team' in report_options and report_options['show_total_bugs_per_team']:
545 document.getElementById(team + "-total").innerHTML = totals[team];
546 % endif
547 });
548 if (first_time) {
549 first_time = false;
550 sortList = [[3,1], [4,1]];
551 $.each(tables, function(team, val) {
552 id = team.replace(/ /g, '_');
553 $("#" + id).trigger("sorton", [sortList]);
554 });
555 }
556 % if 'show_total_bugs' in report_options and report_options['show_total_bugs']:
557 document.getElementById("bug-total").innerHTML = "Total: " + bug_total;
558 % endif
559 }
560
561 $(document).ready(function(){
562 // Expand Panel
563 $("#open").click(function(){ $("div#panel").slideDown("slow"); });
564
565 // Collapse Panel
566 $("#close").click(function(){ $("div#panel").slideUp("slow"); });
567
568 // Switch buttons on the tab from "Options" to "Close"
569 $("#toggle a").click(function () { $("#toggle a").toggle(); });
570
571 series_handler(null, null, false);
572 importance_handler(null, null, false);
573 status_handler(null, null, false);
574 /*
575 assignee_handler(null, null, false);
576 date_handler(null, null, false);
577 */
578 update_tables();
579 });
580 </script>
581
582</html>
583<!-- vi:set ts=4 sw=4 expandtab syntax=mako: -->

Subscribers

People subscribed via source and target branches

to all changes: