Mercurial > bugzilla-dashboard
changeset 6:8c29933b8435
show reported and CC'd bugs, sort bug list by last changed
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sun, 07 Mar 2010 19:25:20 -0800 |
parents | cc7d72e1ac2e |
children | d27bd0db6bf1 |
files | dashboard.js index.html |
diffstat | 2 files changed, 46 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dashboard.js Sun Mar 07 15:32:37 2010 -0800 +++ b/dashboard.js Sun Mar 07 19:25:20 2010 -0800 @@ -1,8 +1,28 @@ $(window).ready( function() { + function sortByLastChanged(bugs) { + bugs.forEach( + function(bug) { + var parseableTime = bug.last_change_time.replace(/-/g,"/"); + parseableTime = parseableTime.replace(/[TZ]/g," "); + bug._lctime = new Date(parseableTime); + }); + + function compare(a, b) { + if (a._lctime < b._lctime) + return -1; + if (a._lctime > b._lctime) + return 1; + return 0; + } + + bugs.sort(compare); + } + function showBugs(query, bugs) { var table = $("#templates .bugs").clone(); var rowTemplate = table.find(".bug-row").remove(); + sortByLastChanged(bugs); bugs.reverse(); bugs.forEach( function(bug) { @@ -72,9 +92,30 @@ changed_after: timeAgo(MS_PER_WEEK), email1: "avarma@mozilla.com", email1_type: "equals", - email1_assigned_to: 1}); + email1_assigned_to: 1, + email1_reporter: 1, + email1_cc: 1}); report("#code-reviews", {status: ["NEW", "UNCONFIRMED", "ASSIGNED", "REOPENED"], flag_DOT_requestee: "avarma@mozilla.com"}); + + report("#reported-bugs", + {status: ["NEW", "UNCONFIRMED", "ASSIGNED", "REOPENED"], + email1: "avarma@mozilla.com", + email1_type: "equals", + email1_reporter: 1, + email2: "avarma@mozilla.com", + email2_type: "not_equals", + email2_assigned_to: 1}); + + report("#cc-bugs", + {status: ["NEW", "UNCONFIRMED", "ASSIGNED", "REOPENED"], + email1: "avarma@mozilla.com", + email1_type: "equals", + email1_cc: 1, + email2: "avarma@mozilla.com", + email2_type: "not_equals", + email2_assigned_to: 1, + email2_reporter: 1}); });
--- a/index.html Sun Mar 07 15:32:37 2010 -0800 +++ b/index.html Sun Mar 07 19:25:20 2010 -0800 @@ -13,6 +13,10 @@ <div id="fixed-bugs"></div> <h2>My Requested Code Reviews</h2> <div id="code-reviews"></div> +<h2>My Reported Bugs</h2> +<div id="reported-bugs"></div> +<h2>My CC'd Bugs</h2> +<div id="cc-bugs"></div> <div id="templates"> <table class="bugs"> <tr class="header">