Community
Participate
Working Groups
Mylyn has been using the following to list stats: 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"); require_once($_SERVER['DOCUMENT_ROOT']."/projects/common/bug.class.php"); require_once($_SERVER['DOCUMENT_ROOT']."/projects/common/project-info.class.php"); require_once($_SERVER['DOCUMENT_ROOT']."/projects/common/project_bugs.class.php"); $votesBugs = new ProjectBugs("tools.mylyn"); $votesEnhancements = new ProjectBugs("tools.mylyn", 2); Something has changed, probalby in the past week or two, where including this in the bugs page has been causing the page to be completely empty.
Mik, can you tell me which APIs you were using from ProjectBugs? As we are moving from an XML-based project meta-data to a database-based project meta-data, we removed the previous classes (sorry, I didn't know anybody was using them). I will recreate the APIs that you were/are using but base them on the new database-based project meta-data - just let me know which APIs they were.
Thanks Bjorn. We were using the following in combination with the stuff in the Description of this bug. <div id="rightcolumn"> <font size=1> <?= $votesBugs->getAsSideHTML("Top Voted Bugs") ?> <?= $votesEnhancements->getAsSideHTML("Top Voted Enhancements") ?> </font> </div> This is the last recommendation I saw on getting the vote rankings (from you, quite a while back), and I still find that to be a very useful feature. Feel free to give us an API you want for getting them, as long as you provide a snippet :)
(In reply to comment #2) Mik, I believe I restored and updated the necessary files to resurrect this API but you didn't tell me which page of yours was not working/should now be working. Could you provide the URL so that I can test my restoration? Thanks.
Sorry for the slow reply on this. I tried again and it is still breaking as per the Description of this bug. The URL of the page is: http://www.eclipse.org/mylyn/bugs/ I'll attach the full PHP that used to work, but causes the web page to be blank now.
Created attachment 83666 [details] PHP for Mylyn bugs page
Note that I have commented this out of our current page, so when you go to http://www.eclipse.org/mylyn/bugs/ the page will not be blank, but will be missing the bug stats.
Bjorn: any news on this? It would be great to get those bug stats back.
I looked at this a bit and decided that the old code was just too awful to try to resurrect. Could you remind me what it was supposed to do and we'll build some new code that does that. Good, clean code. Healthy and non-awful.
Healthy code sounds good :) All that Mylyn wants, and that I hope other projects would want too, is a listing of the top-ten voted enhancements and top-ten voted bugs (i.e. reports not marked enhancement). In other words, what we get from https://bugs.eclipse.org/bugs/ but per-project. It could be nice to have on the common project pages too, but this request is about supporting embedding into our own pages via a bit of PHP.
> All that Mylyn wants, and that I hope other projects would want too, is a > listing of the top-ten voted enhancements and top-ten voted bugs Here are the queries I use on the bugzilla home page to show similar results. Keep in mind that the bugzilla home page is static html that is generated by a script every hour to save on the database queries. Note that each query takes about .2 to .7 seconds to run, and could perhaps be optimized to eliminate a file sort on the votes table. # top 10 bugs in last 6 months SELECT VOT.bug_id, sum(VOT.vote_count) as Total, BUG.short_desc, PRD.name FROM votes AS VOT INNER JOIN bugs AS BUG on BUG.bug_id = VOT.bug_id INNER JOIN products AS PRD on PRD.id = BUG.product_id WHERE BUG.bug_status NOT IN ('VERIFIED', 'CLOSED') AND BUG.resolution NOT IN ('DUPLICATE', 'FIXED', 'INVALID', 'WONTFIX', 'WORKSFORME') AND BUG.bug_severity <> 'enhancement' AND BUG.creation_ts > DATE_SUB(CURDATE(), INTERVAL 6 MONTH) GROUP BY BUG.bug_id ORDER BY Total DESC LIMIT 10 =========================================================== # top 10 enhancements in last 6 months SELECT VOT.bug_id, sum(VOT.vote_count) as Total, BUG.short_desc, PRD.name FROM votes AS VOT INNER JOIN bugs AS BUG on BUG.bug_id = VOT.bug_id INNER JOIN products AS PRD on PRD.id = BUG.product_id WHERE BUG.bug_status NOT IN ('VERIFIED', 'CLOSED') AND BUG.resolution NOT IN ('DUPLICATE', 'FIXED', 'INVALID', 'WONTFIX', 'WORKSFORME') AND BUG.bug_severity = 'enhancement' AND BUG.creation_ts > DATE_SUB(CURDATE(), INTERVAL 6 MONTH) GROUP BY BUG.bug_id ORDER BY Total DESC LIMIT 10 =========================================================== # top 10 helpwanted in last 6 months SELECT VOT.bug_id, sum(VOT.vote_count) as Total, BUG.short_desc, PRD.name FROM votes AS VOT INNER JOIN bugs AS BUG on BUG.bug_id = VOT.bug_id INNER JOIN products AS PRD on PRD.id = BUG.product_id WHERE BUG.bug_status NOT IN ('VERIFIED', 'CLOSED') AND BUG.resolution NOT IN ('DUPLICATE', 'FIXED', 'INVALID', 'WONTFIX', 'WORKSFORME') AND BUG.keywords LIKE '%helpwanted%' GROUP BY BUG.bug_id ORDER BY Total DESC LIMIT 10
We won't be re-enabling this.