| <?php |
| /******************************************************************************* |
| * Copyright (c) 2015 Eclipse Foundation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Wayne Beaton - initial API and implementation |
| *******************************************************************************/ |
| require_once ($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); |
| require_once ($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); |
| require_once ($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); |
| $App = new App(); |
| $Nav = new Nav(); |
| $Menu = new Menu(); |
| |
| // Generate a chart. |
| include ($App->getProjectCommon()); |
| if ($App->devmode) { |
| $bugs = 13; |
| $candidates = 3; |
| $participants = 65; |
| $contributions = 17; |
| $fixed = 5; |
| } else { |
| $result = $App->bugzilla_sql("select count(distinct b.bug_id) as bugs, count(distinct b.assigned_to) as candidates, count(distinct pp.login_name) as participants, count(distinct if(sa.class='Bugzilla::Extension::GitGerritBugUrl::Gerrit',b.bug_id,0))-1 as contributions, count(distinct if(b.resolution='FIXED',b.bug_id,0)) as fixed from bugs as b join longdescs on b.bug_id=longdescs.bug_id join profiles as pp on pp.userid=longdescs.who left join bug_see_also as sa on b.bug_id=sa.bug_id where b.bug_id in (select k.bug_id from keywords as k join keyworddefs as kd on k.keywordid=kd.id and kd.name='greatfix')"); |
| if ($row = mysql_fetch_assoc($result)) { |
| $bugs = $row['bugs']; |
| $candidates = $row['candidates']; |
| $participants = $row['participants']; |
| $contributions = $row['contributions']; |
| $fixed = $row['fixed']; |
| } |
| } |
| |
| if (isset($bugs)) { |
| $App->addExtraHtmlHeader("<script type=\"text/javascript\" src=\"https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1.1','packages':['bar']}]}\"></script>"); |
| $App->addExtraHtmlHeader(" |
| <script type=\"text/javascript\"> |
| google.setOnLoadCallback(drawStuff); |
| |
| function drawStuff() { |
| var data = google.visualization.arrayToDataTable([ |
| ['Live Stats', 'Count'], |
| ['Candidates', $bugs], |
| ['Contributors', $candidates], |
| ['Patches', $contributions], |
| ['Accepted', $fixed] |
| ]); |
| var options = { |
| title: 'Great Fixes for Mars stats', |
| width: 480, |
| height: 200, |
| bar: {groupWidth: '95%'}, |
| legend: { position: 'none' } |
| }; |
| var chart = new google.charts.Bar(document.getElementById('greatfix_stats')); |
| chart.draw(data, options); |
| }; |
| </script> |
| "); |
| } |
| |
| $greatfix_candidates = "https://bugs.eclipse.org/bugs/buglist.cgi?keywords=greatfix%2C%20&keywords_type=allwords&list_id=11168875&query_format=advanced"; |
| |
| // Build a short list of "seed" bugs. |
| // Hard-coded for now so that I can manually tune this list as necessary. |
| // Note that the lists contain more bugs than we need so that we can automatically |
| // prune out bugs that have already been claimed or have been fixed. |
| // Bugs are sorted so that those marked as bugday or helpwanted appear |
| // at the top (in that order). |
| if (!$App->devmode) { |
| $seed_platform = array( |
| 435024, |
| 420956, |
| 378644, |
| 384835, |
| 269121, |
| 117746, |
| 378811, |
| 401633, |
| 428664, |
| 375576, |
| 354538, |
| 437353, |
| 436225, |
| 436763, |
| 366708, |
| 373294, |
| 427777, |
| 432498, |
| 394386, |
| 406733, |
| 436755, |
| 118919, |
| 411704, |
| 436236, |
| 438324, |
| 432849, |
| 340889, |
| 435274, |
| 436572, |
| 430403, |
| 397029, |
| 378672, |
| 430128, |
| 398837, |
| 350251, |
| 201589, |
| 432399, |
| 437207, |
| 445600, |
| 429505, |
| 410749, |
| 431032, |
| 401632, |
| 348429, |
| 432785, |
| 436645, |
| 424978, |
| 434102, |
| 392876, |
| 416650, |
| 232171, |
| 401327, |
| 434108, |
| 400578, |
| 435435, |
| 431990, |
| 37478, |
| 421425, |
| 269271, |
| 374132, |
| 391145, |
| 436863, |
| 433809, |
| 436247, |
| 434506, |
| 372523, |
| 435191, |
| 389920, |
| 401835, |
| 445305, |
| 376486, |
| 430205, |
| 320901, |
| 372799, |
| 380663, |
| 366554, |
| 366608, |
| 325937, |
| 375744, |
| 430872, |
| 436499, |
| 330117, |
| 392715, |
| 399659, |
| 410087, |
| 414845, |
| 431894, |
| 423056, |
| 430964, |
| 435161, |
| 414736, |
| 432466, |
| 435655, |
| 435623, |
| 434207, |
| 436788, |
| 366606, |
| 361133, |
| 371934, |
| 388476, |
| 387714, |
| 431218, |
| 405542, |
| 376486, |
| 412013, |
| 414738, |
| 174689, |
| 348560, |
| 434871, |
| 336584, |
| 422720, |
| 432686, |
| 413410, |
| 433789, |
| 436796, |
| 366635, |
| 377448, |
| 388510, |
| 403930, |
| 436115, |
| 433519, |
| 435512, |
| 430051, |
| 413112, |
| 430199, |
| 333742, |
| 334303, |
| 178229, |
| 301687, |
| 365592, |
| 366564, |
| 393454, |
| 402322, |
| 404231, |
| 408309, |
| 366600, |
| 260408, |
| 433723, |
| 435915, |
| 436164, |
| 436183, |
| 420843, |
| 279902, |
| 382625, |
| 437202, |
| 366534, |
| 383832, |
| 412634, |
| 325965, |
| 376862, |
| 436062, |
| 378566, |
| 418661, |
| 431097, |
| 391430, |
| 432463, |
| 435847, |
| 437624, |
| 433215, |
| 416845, |
| 417367, |
| 428297, |
| 365607, |
| 209873, |
| 320727, |
| 345608, |
| 366595, |
| 373011, |
| 378408, |
| 384351, |
| 395455, |
| 398475, |
| 402519, |
| 404727, |
| 408592, |
| 408740, |
| 409678, |
| 413952, |
| 418589, |
| 359778, |
| 153470, |
| 366602, |
| 427647, |
| 401015, |
| 367116, |
| 429793, |
| 431242, |
| 436840, |
| 387579, |
| 421155, |
| 404015, |
| 416761, |
| 389478, |
| 222877, |
| 242246, |
| 275923, |
| 372508, |
| 378861, |
| 397704, |
| 402593, |
| 410624, |
| 191256, |
| 412739, |
| 427623, |
| 431376, |
| 431862, |
| 436448, |
| 432856, |
| 388963, |
| 317207, |
| 374017, |
| 283930, |
| 314463, |
| 331131, |
| 339740, |
| 348331, |
| 350799, |
| 355426, |
| 356457, |
| 364566, |
| 369237, |
| 373007, |
| 391344, |
| 398277, |
| 400217, |
| 401534, |
| 410164, |
| 414611, |
| 414888, |
| 418231, |
| 360468, |
| 368466, |
| 280033, |
| 405859, |
| 385278, |
| 304530, |
| 430126, |
| 433765, |
| 281593, |
| 430306, |
| 436322, |
| 433895 |
| ); |
| $seed_webtools = array( |
| 271360, |
| 363803, |
| 417137, |
| 419931, |
| 436737, |
| 453700, |
| 459244 |
| ); |
| function greatfix__find_bugs($ids, $max) { |
| global $App; |
| $list = join(',', $ids); |
| $seed_bugs = array(); |
| $result = $App->bugzilla_sql(" |
| select distinct |
| b.bug_id as id, b.short_desc as summary, |
| pr.name as product, cp.name as component |
| from bugs as b |
| join products as pr on b.product_id=pr.id |
| join components as cp on b.component_id=cp.id |
| left join keywords as k on b.bug_id=k.bug_id |
| left join keyworddefs as kd on k.keywordid=kd.id |
| and kd.name in ('bugday', 'helpwanted') |
| and kd.name not in ('greatfix', 'greatbug') |
| where bug_status in ('NEW', 'REOPENED') |
| and b.bug_id in ($list) |
| order by if(kd.name='bugday',1,if(kd.name='helpwanted', 2,3)) |
| limit $max"); |
| while ($row = mysql_fetch_assoc($result)) { |
| $id = $row['id']; |
| $summary = trim(preg_replace('/\[[^\]]+\]/', '', $row['summary'])); |
| $product = $row['product']; |
| $component = $row['component']; |
| |
| $seed_bugs[] = "<li><a href=\"https://bugs.eclipse.org/$id\">$id</a> [$product/$component] $summary"; |
| } |
| return $seed_bugs; |
| } |
| |
| $seed_bugs = greatfix__find_bugs($seed_platform, 10); |
| $seed_bugs = array_merge($seed_bugs, greatfix__find_bugs($seed_webtools, 5)); |
| |
| if ($seed_bugs) { |
| // shuffle($seed_bugs); |
| $bug_list = "<ul>" . join("\n", $seed_bugs) . "</ul>"; |
| } |
| } |
| |
| ob_start(); |
| |
| $pageKeywords = ""; |
| $pageTitle = "Great Fixes for Mars"; |
| $pageAuthor = "Wayne Beaton"; |
| ?> |
| |
| <div id="midcolumn"> |
| <div class="homeitem"> |
| <h1><?= $pageTitle ?></h1> |
| |
| <hr/> |
| <p><strong>The Great Fixes for Mars Skills Competition is |
| complete!</strong> We greatly appreciate the efforts of all the |
| participants. Watch this space: the competition was such a great |
| success, that we intend to do it again!</p> |
| <hr/> |
| |
| <p> |
| <b>Great Fixes for Mars</b> is a skills competition. Flex your |
| Eclipse development skills for an opportunity to win great prizes! |
| </p> |
| <p> |
| A <b>Great Fix</b> is a contribution provides a significant |
| improvement in the <i>Java development experience</i> using Eclipse. |
| Special consideration will be given to performance or stability |
| improvements, and patches that improve the user experience. |
| </p> |
| <h2>Who Can participate?</h2> |
| <p>To qualify, you must be a contributor who is not a committer on the |
| project that accepts the contribution. So, you can be an Eclipse |
| committer on a different Eclipse project and qualify. Contributors |
| must have signed the Eclipse Foundation's Contributor License |
| Agreement (CLA).</p> |
| <p> |
| A <b>Great Fix</b> must be fixed by the contributor on their own |
| qualifications (i.e. if your starting point is "I want to fix bug |
| xyz, but don't know much about the code. Please explain how I should |
| start", then—respectfully—this isn't for you). |
| </p> |
| <p>Contributors can enter more than once.</p> |
| <p> |
| <b>Void where prohibited by law.</b> |
| </p> |
| <?php |
| // Only attempt to display participation stats if we have them. |
| if (isset($bugs)) { |
| ?> |
| <h3 id="stats">Participation Stats</h3> |
| <p> |
| We have <?php echo $candidates; ?> contributors submitting |
| <?= $bugs ?> <a href="<?= $greatfix_candidates ?>">candidate fixes</a>. |
| <?= $participants?> |
| developers are involved in the discussion. You can join too! |
| |
| |
| |
| <div id="greatfix_stats" style="width: 480px; height: 200px;"></div> |
| <?php } ?> |
| |
| <h2 id="evaluation">Evaluation</h2> |
| <p> |
| To qualify for consideration as a <b>Great Fix</b>, a contribution: |
| </p> |
| <ul> |
| <li>must be submitted by a non-committer; and</li> |
| <li>be accepted by a project committer and merged into the |
| corresponding source code repository.</li> |
| </ul> |
| <p>Qualifying submissions will be judged on three criteria: points |
| will be assigned based on knowledge of the contributor, type of fix, |
| and impact to the community.</p> |
| <p>Contributor knowledge (1-5 points):</p> |
| <ul> |
| <li>Committer accepts contribution without modification (5)</li> |
| <li>Minor changes required (3)</li> |
| <li>Structural changes required (1)</li> |
| </ul> |
| <p>Type of fix (1-5 points):</p> |
| <ul> |
| <li>Performance (5)</li> |
| <li>Stability (4)</li> |
| <li>Direct user experience (3)</li> |
| <li>Indirect user experience (2)</li> |
| <li>Other (1)</li> |
| </ul> |
| <p>Impact on the community (1-5) as determined by the committer.</p> |
| <h2 id="prizes">Prizes</h2> |
| <ul> |
| <li>Winners will receive an Android tablet provided by Google |
| (details pending); and</li> |
| <li>Other contributors that submit a qualifying fix receive an |
| Eclipse t-shirt (one per contributor).</li> |
| </ul> |
| <h2 id="timing">Timing</h2> |
| <p>The programme runs in cycles; submissions must be accepted by a |
| project committer before 900h ET on the specified deadline date. |
| We'll announce the winners at the end of each cycle.</p> |
| |
| <h3>May 8 Winners</h3> |
| <p> |
| Our final <b>four</b> top-prize winners are: |
| </p> |
| <ul> |
| <li>Tony McCrary</li> |
| <li>Robert Roth</li> |
| <li>Fabio Zadrozny</li> |
| <li>Simon Scholz</li> |
| </ul> |
| |
| <h3>April 1 Winners</h3> |
| <p> |
| Our second <b>three</b> top-prize winners were announced on April 1. |
| No fooling. |
| </p> |
| <ul> |
| <li>Snjezana Peco</li> |
| <li>Tomasz Zarna</li> |
| <li>Dirk Fauth</li> |
| </ul> |
| |
| <h3>March 12 Winners</h3> |
| <p> |
| Our first <b>three</b> top-prize winners were announced during the |
| closing session at EclipseCon on March 12. |
| </p> |
| <ul> |
| <li>Andrey Loskutov</li> |
| <li>Mateusz Matela</li> |
| <li>John Glassmyer</li> |
| </ul> |
| |
| <p>All runners up receive an Eclipse T-Shirt.</p> |
| |
| <h2 id="start">Where do I start?</h2> |
| <p>If you want to contribute a great fix (sorry, we don't have any |
| more prizes now that the competition has ended), you can select |
| from these bugs, or from the larger pool of bugs.</p> |
| <h3>Step One: Pick a bug</h3> |
| <?php |
| if (isset($bug_list)) { |
| echo "<p>Here are some available high-priority bugs to select from:</p>"; |
| echo $bug_list; |
| } |
| ?> |
| <p>Here are some good places to look for candidates:</p> |
| <ul> |
| <li>Bug 1..100 from <a |
| href="http://wiki.eclipse.org/Platform_UI/Plan/4.5/Planning_Bugs" |
| title="Platform UI/Plan/4.5/Planning Bugs">Eclipse Platform 4.5 |
| Planning Bugs</a>; |
| </li> |
| <li><a rel="nofollow" class="external text" |
| href="https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&classification=Eclipse&keywords=bugday&keywords_type=allwords&list_id=11139814&product=JDT&product=PDE&product=Platform&query_format=advanced">"Bug |
| Day" bugs for the Platform, JDT, and PDE</a>; and</li> |
| <li><a rel="nofollow" class="external text" |
| href="https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&classification=WebTools&list_id=11100076&query_format=advanced&status_whiteboard=greatfix_candidate&status_whiteboard_type=allwordssubstr ">Great |
| Fix candidates for the Web Tools project</a>;</li> |
| </ul> |
| <p>When you've selected a bug:</p> |
| <ul> |
| <li>Take ownership of the bug (assign the bug to yourself)</li> |
| <li>Add the "greatfix" keyword to the bug; and</li> |
| <li>Add a comment with the date you intend to submit the patch.</li> |
| </ul> |
| <p> |
| A committer will <i>+1</i> your comment, indicating their willingness |
| to review your contribution when it is submitted. Note that this does |
| not guarantee that the committer will accept your contribution or |
| that they will spend any signficant amount of time working with you |
| on the contribution. |
| </p> |
| <h3>Step Two: Sort out how to contribute</h3> |
| <p>All projects provide a contribution guide that can help you know |
| what you need to do to ensure that your contribution is accepted.</p> |
| <ul> |
| <li><a href="http://wiki.eclipse.org/Platform_UI/How_to_Contribute" |
| title="Platform UI/How to Contribute">How to Contribute to the |
| Platform UI Project</a></li> |
| <li>You should find a contribution guide in the root of the Git |
| repository</li> |
| </ul> |
| <p> |
| Use the <a href="http://wiki.eclipse.org/Eclipse_Oomph_Installer" |
| title="Eclipse Oomph Installer">Oomph Eclipse Installer</a> to build |
| your development environment and provision your workspace with the |
| exact source code and workbench configuration you need to get started |
| immediately. |
| </p> |
| <h3>Step Three: Connect with the team</h3> |
| <p>Discuss the bug via comments on the bug report and project |
| "dev" list.</p> |
| <h3>Step Four: Contribute!</h3> |
| <p>Push your fixes to the project's Gerrit/Git repository (be sure to |
| check the project's contribution guidelines).</p> |
| <p> |
| Please review <a |
| href="https://wiki.eclipse.org/Development_Resources/Contributing_via_Git">Contributing |
| via Gerrit/Git</a>. |
| </p> |
| <h3>Step Five: Reap the Rewards</h3> |
| <p>Bask in the glory.</p> |
| </div> |
| </div> |
| |
| |
| <?php |
| |
| $html = ob_get_contents(); |
| ob_end_clean(); |
| $App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html ); |
| ?> |