Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005780TestLinkDatabase Postgrespublic2013-06-17 06:332013-09-08 17:55
Reportersvt_qc 
Assigned Tofman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSLinuxOS VersionUbuntu 12.04.2
Product Version1.9.7 (2013 Q2 - bug fixing) 
Fixed in Version1.9.8 (2013 Q3 - bug fixing) 
Summary0005780: POSTGRES SQL SYNTAX SPECIFIC ISSUE - Filters in "Test execution" with "ALL Builds" is applied, ERROR ON exec_query()
DescriptionWhen Filters in "Test execution" with on "ALL Builds" is applied, ERROR ON exec_query() is displayed.

I am using Postgres 9.1.

Postgres manual says that
"An output column’s name can be used to refer to the column’s value in ORDER BY and GROUP BY clauses, but not in the WHERE or HAVING clauses; there you must write out the expression instead."

testplan.class.php includes the error like expression.

line 4175
    $sql = " /* $debugMsg */ " .
        " /* Count() to be used on HAVING */ " .
        " SELECT COUNT(0) AS COUNTER ,NHTCV.parent_id AS tcase_id" .
(omit)
        " GROUP BY tcase_id " .
        " HAVING COUNTER = " . intval($buildsCfg['count']) ;


When I changed to " HAVING COUNT(0) = " . intval($buildsCfg['count']) ;
it works.


Steps To Reproduceusing Postgresql
1. goto "Test Execution"
2. set Filter as "Not Run" on ALL Builds".
3. click apply.

==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ==============================================================================
#0 database->exec_query() called at [/var/www/html/testlink/lib/functions/database.class.php:639]
#1 database->fetchRowsIntoMap() called at [/var/www/html/testlink/lib/functions/testplan.class.php:4558]
0000002 testplan->getHitsSameStatusFullALOP() called at [/var/www/html/testlink/lib/functions/treeMenu.inc.php:1274]
0000003 filterStatusSetAllActiveBuilds() called at [/var/www/html/testlink/lib/functions/execTreeMenu.inc.php:588]
0000004 applyStatusFilters() called at [/var/www/html/testlink/lib/functions/execTreeMenu.inc.php:231]
0000005 execTree() called at [/var/www/html/testlink/lib/functions/tlTestCaseFilterControl.class.php:1046]
0000006 tlTestCaseFilterControl->build_tree_menu() called at [/var/www/html/testlink/lib/execute/execNavigator.php:35]

 ==============================================================================
Additional InformationI modified testplan.class.php with Line
4005
4147
4195
4310
4556
4610

TagsNo tags attached.
Database (MySQL,Postgres,etc)Postgres 9.1
Browser
PHP Version
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Files

- Relationships
child of 0005731closedfman Availables hot-fixes for 1.9.7 & How To get full fixed package from gitorious 

-  Notes
(0019157)
fman (administrator)
2013-06-17 17:20

thanks for the notice
please provide modified file not the changed lines
(0019158)
fman (administrator)
2013-06-17 18:51

http://gitorious.org/testlink-ga/testlink-code/commit/040cc118aa4a98f147a9ec9741cfe9ee6f77ce2c [^]
(0019555)
fman (administrator)
2013-09-08 17:55

1.9.8 released

- Issue History
Date Modified Username Field Change
2013-06-17 06:33 svt_qc New Issue
2013-06-17 17:20 fman Note Added: 0019157
2013-06-17 17:21 fman Summary When Filters in "Test execution" with on "ALL Builds" is applied, ERROR ON exec_query() is displayed. => POSTGRES SQL SYNTAX SPECIFIC ISSUE - Filters in "Test execution" with "ALL Builds" is applied, ERROR ON exec_query()
2013-06-17 18:44 fman Description Updated View Revisions
2013-06-17 18:51 fman QA Team - Task Workflow Status TBD => READY FOR TESTING
2013-06-17 18:51 fman Note Added: 0019158
2013-06-17 18:51 fman Status new => resolved
2013-06-17 18:51 fman Fixed in Version => 1.9.8 (2013 Q3 - bug fixing)
2013-06-17 18:51 fman Resolution open => fixed
2013-06-17 18:51 fman Assigned To => fman
2013-06-17 18:51 fman Relationship added child of 0005731
2013-09-08 17:55 fman Note Added: 0019555
2013-09-08 17:55 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker