Merge lp:~smajevic-irfan/ubuntu-qa-website/gci into lp:ubuntu-qa-website

Proposed by Irfan Smajevic on 2015-12-13
Status: Merged
Merged at revision: 407
Proposed branch: lp:~smajevic-irfan/ubuntu-qa-website/gci
Merge into: lp:ubuntu-qa-website
Diff against target: 70 lines (+9/-9)
2 files modified
modules/qatracker/qatracker.pages.php (+3/-3)
modules/qatracker/report/qatracker.report.testers.php (+6/-6)
To merge this branch: bzr merge lp:~smajevic-irfan/ubuntu-qa-website/gci
Reviewer Review Type Date Requested Status
Nicholas Skaggs 2015-12-13 Approve on 2015-12-14
Review via email: mp+280403@code.launchpad.net

Description of the Change

Changed "Top 20 (of all time)" page to include the top 100 testers and changed the name "Top 100 (of all time)"

To post a comment you must log in.
Nicholas Skaggs (nskaggs) wrote :

LGTM, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/qatracker/qatracker.pages.php'
2--- modules/qatracker/qatracker.pages.php 2012-11-19 19:45:41 +0000
3+++ modules/qatracker/qatracker.pages.php 2015-12-13 21:49:57 +0000
4@@ -207,9 +207,9 @@
5 'type' => MENU_NORMAL_ITEM,
6 'weight' => -8);
7
8- $items['qatracker/reports/testers/top20'] = array(
9- 'title' => t("Top 20 (of all time)"),
10- 'description' => t("Top 20 (of all time)"),
11+ $items['qatracker/reports/testers/top100'] = array(
12+ 'title' => t("Top 100 (of all time)"),
13+ 'description' => t("Top 100 (of all time)"),
14 'file' => 'report/qatracker.report.testers.php',
15 'page arguments' => array("qatracker_report_testers"),
16 'access arguments' => array("access content"),
17
18=== modified file 'modules/qatracker/report/qatracker.report.testers.php'
19--- modules/qatracker/report/qatracker.report.testers.php 2015-05-31 14:53:33 +0000
20+++ modules/qatracker/report/qatracker.report.testers.php 2015-12-13 21:49:57 +0000
21@@ -39,7 +39,7 @@
22 $query->leftjoin('qatracker_build', 'qatracker_build', 'qatracker_build.id = qatracker_build_milestone.buildid');
23 $query->leftjoin('qatracker_result', 'qatracker_result', 'qatracker_result.buildid = qatracker_build.id');
24 $query->leftjoin('users', 'users', 'users.uid = qatracker_result.reporterid');
25- if (arg(3) != "top20") {
26+ if (arg(3) != "top100") {
27 $query->fields('qatracker_milestone', array('title', 'status'));
28 $query->condition('qatracker_milestone.status', array(0,1), 'IN');
29 $query->orderBy('qatracker_milestone.status', 'ASC');
30@@ -47,7 +47,7 @@
31 $query->groupBy('qatracker_milestone.id, qatracker_milestone.title, qatracker_milestone.status, users.name');
32 }
33 else {
34- $query->range(0, 20);
35+ $query->range(0, 100);
36 $query->groupBy('users.name');
37 }
38 if(array_key_exists("date_from", $_POST) && $_POST['date_from']) {
39@@ -70,11 +70,11 @@
40
41 if (!function_exists("new_table")) {
42 function new_table($rows, $milestone, $status) {
43- if (arg(3) != "top20") {
44+ if (arg(3) != "top100") {
45 $title = $milestone." (".$status.")";
46 }
47 else {
48- $title = t("Top 20 (of all time)");
49+ $title = t("Top 100 (of all time)");
50 }
51 return array(
52 '#theme' => 'table',
53@@ -89,7 +89,7 @@
54 }
55
56 foreach ($result as $record) {
57- if (arg(3) != "top20" && $milestone && $milestone != $record->title) {
58+ if (arg(3) != "top100" && $milestone && $milestone != $record->title) {
59 $items[] = new_table($rows, $milestone, $status);
60 $rows = array();
61 $position = 1;
62@@ -102,7 +102,7 @@
63 l($record->name, "http://launchpad.net/~".$record->name),
64 $record->count,
65 );
66- if (arg(3) != "top20") {
67+ if (arg(3) != "top100") {
68 $milestone = $record->title;
69 $status = $qatracker_milestone_status[$record->status];
70 }

Subscribers

People subscribed via source and target branches