/[webwml]/newmaint/index.wml
ViewVC logotype

Contents of /newmaint/index.wml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download)
Thu Jan 13 00:51:27 2005 UTC (8 years, 4 months ago) by tbm
Branch: MAIN
Changes since 1.14: +1 -1 lines
Better wording, with the help of Erinn Clark <erinn@double-helix.org>.
1 <?
2 include("config.inc");
3 include("common.inc");
4 ?>
5 #use wml::nmpage title="Debian New Maintainer"
6 <?
7 function print_days($db, $startdate, $stopdate)
8 {
9 $where = " WHERE " . $stopdate . " IS NOT NULL AND CURRENT_TIMESTAMP - $stopdate < '2 months' AND " . $stopdate . " >= " . $startdate;
10
11 #
12 # Mode - the most "popular" number
13 #$sql = "SELECT (date_part('epoch', age(" . $stopdate . "," . $startdate . "))/86400)::int, count(*) AS entries FROM applicant " . $where;
14 #$sql .= " GROUP BY age(" . $stopdate . "::date," . $startdate . "::date)";
15 $sql = "SELECT " . $stopdate . "::date -" . $startdate . "::date AS mode, count(*) AS entries FROM applicant " . $where;
16 $sql .= " GROUP BY mode";
17 $sql .= " ORDER BY entries DESC LIMIT 1";
18 if (! ($query = pg_exec($db, $sql))) {
19 echo "<td colspan=\"2\">Problem with query: ",
20 pg_ErrorMessage($db), "</td>\n";
21 return;
22 }
23 if (pg_NumRows($query) > 0) {
24 $row = pg_Fetch_Row($query, 0);
25 print "<td>" . $row[0] . "</td>";
26 } else {
27 print "<td>??</td>";
28 }
29
30
31 #
32 # First we get the median
33 $sql = "SELECT count(*) FROM applicant " . $where;
34 if (! ($query = pg_exec($db, $sql))) {
35 echo "<td colspan=\"2\">Problem with query: ",
36 pg_ErrorMessage($db), "</td>\n";
37 return;
38 }
39 $row = pg_Fetch_Row($query, 0);
40 $medcount= intval($row[0]/2);
41 $sql = "SELECT $stopdate - $startdate AS median FROM applicant " . $where;
42 $sql .= " ORDER by median";
43 $sql .= " LIMIT 1 OFFSET " . $medcount;
44 if (! ($query = pg_exec($db, $sql))) {
45 echo "<td colspan=\"2\">Problem with query: ",
46 pg_ErrorMessage($db), "</td>\n";
47 return;
48 }
49 if (pg_NumRows($query) > 0) {
50 $row = pg_Fetch_Row($query, 0);
51 print "<td>" . $row[0] . "</td>";
52 } else {
53 print "<td>??</td>";
54 }
55
56
57 $sql = "SELECT avg(date_part('epoch', age(" . $stopdate . "," . $startdate . "))/86400)::int, max(date_part('epoch', age(" . $stopdate . "," . $startdate . "))/86400)::int from applicant " . $where;
58 if (! ($query = pg_exec($db, $sql))) {
59 echo "<td colspan=\"2\">Problem with query: ",
60 pg_ErrorMessage($db), "</td>\n";
61 return;
62 }
63 if (pg_NumRows($query) > 0) {
64 $row = pg_Fetch_Row($query, 0);
65 echo "<td>", $row[0], "</td><td>", $row[1], "</td>";
66 } else {
67 echo "<td>??</td><td>??</td>";
68 }
69 }
70
71 function print_stat($db, $desc, $sql,$startdate,$stopdate)
72 {
73 if (! ($query = pg_exec($db, $sql))) {
74 echo "<tr><td colspan=\"2\">Problem with query: ",
75 pg_ErrorMessage($db), "</td></tr>\n";
76 return;
77 }
78 if (pg_NumRows($query) > 0) {
79 $row = pg_Fetch_Row($query, 0);
80 echo "<tr><td>$desc</td><td>", $row[0], "</td>";
81 } else {
82 echo "<tr><td>$desc</td><td>??</td>";
83 }
84 if ($startdate == '' || $startdate == '') {
85 echo "<td><small>N/A</small></td><td><small>N/A</small></td><td><small>N/A</small></td><td><small>N/A</small></td>";
86 } else {
87 print_days($db,$startdate,$stopdate);
88 }
89 echo "</tr>\n";
90 }
91
92 #
93 # Print stats prints a summary list of statistics about the new
94 # maintainers, as can be assumed from its name it prints them to
95 # the page.
96 function print_stats() {
97 if (! ($db = open_db())) {
98 return;
99 }
100 echo "<table align=\"center\" border=\"1\" summary=\"\">\n";
101 echo "<tr valign=\"bottom\"><td> </td><th>Count</th><th>Mode Days</th><th>Median Days</th><th>Average Days</th><th>Max Days</th></tr>\n";
102
103 #
104 # This is all applicants we know about
105 print_stat($db, "Waiting for Advocate",
106 "SELECT count(*) from applicant where advocate_checked IS NULL", "apply_date", "advocate_checked");
107 print_stat($db, "Awaiting AM assignment",
108 "SELECT count(*) from applicant where advocate_checked IS NOT NULL AND manager_date IS NULL", "advocate_checked", "manager_date");
109 print_stat($db, "Waiting for AM to confirm",
110 "SELECT count(*) from applicant WHERE manager_date IS NOT NULL AND am_confirm_date IS NULL", "manager_date", "am_confirm_date");
111 print_stat($db, "Initial AM contact",
112 "SELECT count(*) FROM applicant WHERE am_confirm_date IS NOT NULL AND am_contact IS NULL", "am_confirm_date", "am_contact");
113 print_stat($db, "Applicants in Process",
114 "SELECT count(*) FROM applicant WHERE am_contact IS NOT NULL AND ( decision IS NULL OR application_ok = 'f')", "am_contact", "decision");
115 print_stat($db, "Awaiting FD Approval",
116 "SELECT count(*) FROM applicant WHERE manager IS NOT NULL AND approved = 't' AND decision IS NOT NULL AND application_ok IS NULL AND (da_approved IS NULL OR (da_approved = 't' AND newmaint IS NULL))", "decision", "application_ok_date");
117 print_stat($db, "Awaiting DAM Approval",
118 "SELECT count(*) FROM applicant WHERE approved = 't' AND (da_approved = 't' OR da_approved IS NULL) AND application_ok = 't' AND newmaint IS NULL", "decision", "newmaint");
119 print_stat($db, "New Maintainers processed",
120 "SELECT count(*) FROM applicant WHERE da_approved = 't' ", 'apply_date', 'newmaint');
121 print_stat($db, "Total Applicants in Database",
122 "SELECT count(*) from applicant" ,'', '');
123 print_stat($db, "On hold at AM stage",
124 "SELECT count(*) FROM applicant WHERE approved = 'f' " , '', '');
125 print_stat($db, "On hold at FD stage",
126 "SELECT count(*) FROM applicant WHERE approved = 't' AND application_ok = 'f' ", '', '');
127 print_stat($db, "On hold at DAM stage",
128 "SELECT count(*) FROM applicant WHERE approved = 't' AND da_approved = 'f' ", '', '');
129 print_stat($db, "Application Managers",
130 "SELECT count(*) FROM manager WHERE max_applicants > 0", '', '');
131 echo "</table>\n";
132 pg_Close($db);
133 }
134 ?>
135
136 <h1>Debian New Maintainer Status</h1>
137
138 <p>This system is used to display or update the status of New Maintainers
139 going through the application system. For more information about the
140 process itself, look at the
141 <a href="http://www.debian.org/devel/join/newmaint">New Maintainers' Corner</a>
142 on our main site.
143
144 <h2>Aggregate Statistics</h2>
145
146 <p>To give you some idea of the size of the application process and where,
147 as a whole, applicants are in the system we have provided some overall
148 statistics. The waiting times are taken from data for the last two months and
149 are incremental for each stage except for the 'New Maintainers Processed'
150 line which is the total time from application to becoming a new maintainer.
151
152 <p>If you want to know more, visit the <a href="stats.php">What do these
153 statistics mean</a> page.
154
155 <?
156 print_stats();
157 ?>
158
159 <hr>
160
161 <h2>Applicant Login</h2>
162
163 <p>If you think you are in the New Maintainer system, enter in the
164 email address you used to apply for it.
165 <br>
166 <div align="center">
167 <form method="post" action="nmstatus.php">
168 <input name="email" type=text>&nbsp;&nbsp;<input type="submit" value="Login">
169 </form>
170 </div>
171 <br>
172 If you don't know what email address you registered with, you can go to
173 <A href="nmlist.php">the list of applicants</A>.
174
175 <hr>
176
177 <h3>Application Manager Login</h3>
178
179 <div align="center">
180 <form method="post" action="amlogin2.php">
181 <table>
182 <tr><td><B>Login:</B></td><td> <input name="username" type=text>@debian.org</td></tr>
183 <tr><td><B>Password:</B></td><td> <input name="passwd" type="password"></td></tr>
184 <tr><td> </td><td><input type="submit" value="Login"></td></tr>
185 </table>
186 </form>
187 </div>
188
189 <hr>
190
191 <h3>Who are we?</h3>
192
193 <p>We are <a href="whoisam.php">a group of Debian developers</a> who have
194 volunteered to assist the Debian Account Managers in processing new
195 applicants to be Debian maintainers.

  ViewVC Help
Powered by ViewVC 1.1.5