Mantis Bugtracker 

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002080TestLinkTest Plan (builds, milestones, test assign)public2009-02-09 18:182009-03-17 15:40
Assigned Tofman 
PlatformOSOS Version
Product Version1.8 RC 4 
Fixed in Version1.8 RC 5 
Summary0002080: Expected % of Mielstones not displayed on the resultsGeneral.tpl
DescriptionPlease correct the following in the files below:
1: testplan.class.php
(line 1156)
function get_milestones($tplan_id)
// $sql="SELECT id, name, a AS high_percentage, b AS medium_percentage, c AS low_percentage, " .
with the line :
    $sql="SELECT id, name, a , b , c , " .

2: resultsGeneral.php
Replace the $item['A'] with small[a] ,[b], [c]etc...

        if ($item['low_percentage'] < $item['c'])
            $item['low_incomplete'] = ON;
            $item['low_incomplete'] = OFF;

        if ($item['medium_percentage'] < $item['b'])
            $item['medium_incomplete'] = ON;
            $item['medium_incomplete'] = OFF;

        if ($item['high_percentage'] < $item['a'])
            $item['high_incomplete'] = ON;
            $item['high_incomplete'] = OFF;

        if ($item['percentage_completed'] < $item['b'])
            $item['all_incomplete'] = ON;
            $item['all_incomplete'] = OFF;

        $item['b'] = number_format($item['b'], 2);
3:resultsGeneral.tpl line140-158
Replace {$res.A} with {$res.a} and so on...
{foreach item=res from=$statistics->milestones}
                  <td>{$|escape} {$tlCfg->gui_separator_open}
                          {$res.target_date|escape} {$tlCfg->gui_separator_close}</td>
                  <td class="{if $res.high_incomplete}failed{else}passed{/if}">
                          {$res.high_percentage} % {$tlCfg->gui_separator_open}
                          {$res.results.3} {$tlCfg->gui_separator_close}</td>
                  <td>{$res.a} %</td>
                  <td class="{if $res.medium_incomplete}failed{else}passed{/if}">
                          {$res.medium_percentage} % {$tlCfg->gui_separator_open}
                          {$res.results.2} {$tlCfg->gui_separator_close}</td>
                  <td>{$res.b} %</td>
                  <td class="{if $res.low_incomplete}failed{else}passed{/if}">
                          {$res.low_percentage} % {$tlCfg->gui_separator_open}
                          {$res.results.1} {$tlCfg->gui_separator_close}</td>
                  <td>{$res.c} %</td>
                <td>{$res.percentage_completed} %</td>
TagsNo tags attached.
Database (MySQL,Postgres,etc)
PHP Version
QA Team - Task Workflow Status
Attached Fileszip file icon [^] (4,811 bytes) 2009-02-09 23:46

- Relationships

-  Notes
amitkhullar (reporter)
2009-02-09 18:20

Or instead of doing all this you can even update the query in get_milestones to
$sql="SELECT id, name, a AS A, b AS B, c AS C, " and then you dont need to touch rest of the points 2 and 3.

fman (administrator)
2009-02-09 23:24

we have problems with UPPER CASE ALIAS and different DB engine => then using these alias is out of discussion.

In addition this silly names (a,b,c) must be avoided, that's why I have used
low_percentage, and so on,
Then bug must be fixed but if possible a,b,c fields must not be used, but maintain new names and no old ones.

Always attach code as zip files please
fman (administrator)
2009-02-09 23:45

try with attached files, (not tested) but this must be direction not using columns A,B,C.
fman (administrator)
2009-02-10 00:26

This problem is not related to DB schema changes.
Changing columns name from UPPER case (these were the only THREE columns in upper case in WHOLE schema !!!!), can not create great problems, and is price to pay in order to have better code.
This bug is due to query changes (my fault anyway), I have missed (as usual) some pages.

I have made this solution proposal, because think firt solution proprosal was to quick & dirty.
fman (administrator)
2009-02-10 00:57

OK, I will try to made some tests and commit

- Issue History
Date Modified Username Field Change
2009-02-09 18:18 amitkhullar New Issue
2009-02-09 18:20 amitkhullar Note Added: 0005318
2009-02-09 18:27 amitkhullar Status new => assigned
2009-02-09 18:27 amitkhullar Assigned To => mhavlat
2009-02-09 23:24 fman Note Added: 0005319
2009-02-09 23:45 fman Note Added: 0005322
2009-02-09 23:46 fman File Added:
2009-02-10 00:13 mhavlat Assigned To mhavlat => fman
2009-02-10 00:26 fman Note Added: 0005324
2009-02-10 00:57 fman Note Added: 0005328
2009-02-11 15:31 fman Status assigned => resolved
2009-02-11 15:31 fman Fixed in Version => next DEV - 1.8 RC 5
2009-02-11 15:31 fman Resolution open => fixed
2009-03-17 15:40 mhavlat Status resolved => closed

Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker