MantisBT - TestLink
View Issue Details
0004090TestLinkReportspublic2010-12-10 11:352011-01-22 15:11
Veron 
fman 
normalminoralways
closedfixed 
1.9 (Prague) 
1.9.1 (bug fixing) 
MySQL 5.1
0004090: Correct custom test result colors aren't shown in charts
Correct custom created test result colors aren't shown in Results by Keyword, Results by Tester and Results for Top Level Suites charts.

The correct colors are shown in Overall Metrics chart.

I took a look at the code and the bug is found in keywordBarChart, ownerBarChart.php and topLevelSuitesBarChart.php:

        foreach($totals as $status => $values)
        {
            $obj->chart_data[] = $values;
            $obj->series_label[] = lang_get($resultsCfg['status_label'][$status]);
            $obj->series_color[] = $resultsCfg['charts']['status_colour'][$status];
        }

When I add similar check than in overallPieChart.php to the code, the custom test result color is shown correctly.

        foreach($totals as $status => $values)
        {
            $obj->chart_data[] = $values;
            $obj->series_label[] = lang_get($resultsCfg['status_label'][$status]);
            if( isset($resultsCfg['charts']['status_colour'][$status]) )
            {
                $obj->series_color[] = $resultsCfg['charts']['status_colour'][$status];
            }
        }
No tags attached.
child of 0004039closed  Availables Fixes for 1.9.0 (Prague) 
zip fix-4090.zip (4,233) 2010-12-10 15:54
http://mantis.testlink.org/file_download.php?file_id=2030&type=bug
Issue History
2010-12-10 11:35VeronNew Issue
2010-12-10 15:48fmanNote Added: 0012941
2010-12-10 15:54fmanFile Added: fix-4090.zip
2010-12-10 15:54fmanNote Added: 0012942
2010-12-10 15:54fmanAssigned To => fman
2010-12-10 15:54fmanStatusnew => feedback
2010-12-13 06:24VeronNote Added: 0012953
2010-12-13 06:24VeronStatusfeedback => assigned
2010-12-13 20:43fmanRelationship addedchild of 0004039
2010-12-13 20:43fmanStatusassigned => resolved
2010-12-13 20:43fmanFixed in Version => 1.9.1 (bug fixing)
2010-12-13 20:43fmanResolutionopen => fixed
2011-01-22 15:11fmanNote Added: 0013392
2011-01-22 15:11fmanStatusresolved => closed

Notes
(0012941)
fman   
2010-12-10 15:48   
OK, thanks
(0012942)
fman   
2010-12-10 15:54   
Please try with attached fix and give us feedback
(0012953)
Veron   
2010-12-13 06:24   
That did the trick.
Custom result colors are now shown correctly on the charts.
(0013392)
fman   
2011-01-22 15:11   
1.9.1 Released