Mantis Bugtracker 

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000825TestLinkReportspublic2007-05-04 00:472007-05-11 00:47
Assigned To 
PrioritynormalSeverityfeature requestReproducibilityalways
PlatformOSOS Version
Product Version1.7.0 RC 2 
Fixed in Version 
Summary0000825: Contribute: Main Page Metrics for all projects
DescriptionA little hack I did to reuse some of the results code to show the metrics for all open test plans for all projects. This doesn't really check roles or accessibility or anything so if you don't want to everyone to know the status of all projects you'll need to edit this a bit. This is basically just a temporary measure until the "official" Main Page Metrics get implemented.

I'm new to pretty much this whole environment (PHP, MySQL, Smarty) so the code may be a little ugly. But it works and doesn't break anything else, so why not? :)
TagsNo tags attached.
Database (MySQL,Postgres,etc)
PHP Version
QA Team - Task Workflow Status
Attached Filestar file icon mpMetrics.tar [^] (61,440 bytes) 2007-05-04 00:48
? file icon mainPage.tpl [^] (3,241 bytes) 2007-05-08 03:32

- Relationships

-  Notes
abasque (reporter)
2007-05-04 00:58

the attached tar contains 4 files:


1. unzip the tar somewhere
2. copy resultsAll.class.php to [testlink dir]/lib/functions
3. copy mainPageMetrics.php to [testlink dir]/lib/general
4. backup your copy of [testlink dir]/lib/general/mainPage.php (I just renamed mine to mainPage.php.old)
5. copy mainPage.php to [testlink dir]/lib/general/
6. backup your copy of [testlink dir]/gui/templates/mainPage.tpl (I just renamed mine to mainPage.tpl.old)
7. copy mainPage.tpl to [testlink dir]/gui/templates/mainPage.tpl

Now everything is in place but the metrics are not turned on. To enable them, edit the [testlink dir]/gui/templates/mainPage.tpl file and change line 51 from {if 0} to {if 1}.

*** IMPORTANT: This setup of main page metrics is NOT tied to the MAIN_PAGE_METRICS_ENABLED constant set in the file - that should still be set to FALSE. That constant is used for the official MPMetrics, which are not done yet. ***

Now log into Testlink, or go to the Home page if you're already logged in. You should see a list of every project, every active test plan under that project, and every active build under that test plan.

Let me know if you're having some problems with this and I'll try to help... any improvement suggestions on this are welcome.
fman (administrator)
2007-05-05 15:43

I will review it, and see how to add to standard code
abasque (reporter)
2007-05-08 03:32

uploaded a new version of mainPage.tpl

This should fix some layout problems seen in Firefox and IE. I basically created a big table for the main frame and put the left, metrics, and right tables into each <td> in a <tr>. This may break the floating of the float menus, but that wasn't working for me anyway.
fman (administrator)
2007-05-11 00:47

Think a better solution is to add a link to show Metrics instead of
showing it on the main page.
Think this will be our standar solution (something like myview on mantis).

- Issue History
Date Modified Username Field Change
2007-05-04 00:47 abasque New Issue
2007-05-04 00:48 abasque File Added: mpMetrics.tar
2007-05-04 00:58 abasque Note Added: 0001627
2007-05-05 15:43 fman Note Added: 0001629
2007-05-08 03:32 abasque Note Added: 0001635
2007-05-08 03:32 abasque File Added: mainPage.tpl
2007-05-11 00:47 fman Note Added: 0001671

Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker