Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001922TestLinkTest Plan (builds, milestones, test assign)public2008-12-10 18:482009-01-20 05:19
Reportersathyz 
Assigned Tofman 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.8 RC 2 
Fixed in Version1.8 RC 3 
Summary0001922: set urgent tests fails to get information for a suite
Descriptionused the latest code from cvs.
selecting a suite in set urgent tests page shows the exec_query() error

[Postgres: 8.3.5]
Additional Information1. Created a Project - Project#1 (with test case prefix = TP1)
2. Created a plan (Plan#1)
3. Added a test suite "Apache" and two testcases for the for the suite
4. Click on the link "Set urgent Tests" link in the testlink home page.
5. Click on the TestSuite Apache

The following error is shown,
ERROR ON exec_query() - database.class.php
0 - - SELECT DISTINCT 'TP1-' AS tcprefix, NHB.name, NHA.parent_id AS testcase_id, TCV.tc_external_id, testplan_tcversions.urgency FROM nodes_hierarchy NHA JOIN nodes_hierarchy NHB ON NHA.parent_id = NHB.id JOIN testplan_tcversions ON testplan_tcversions.tcversion_id=NHA.id JOIN tcversions TCV ON TCV.id = testplan_tcversions.tcversion_id WHERE testplan_tcversions.testplan_id=7 AND NHB.parent_id=2 ORDER BY NHB.node_order

THE MESSAGE :: SQL [14] executed [took 0.0238 secs][all took 0.0848 secs]: SELECT DISTINCT 'TP1-' AS tcprefix, NHB.name, NHA.parent_id AS testcase_id, TCV.tc_external_id, testplan_tcversions.urgency FROM nodes_hierarchy NHA JOIN nodes_hierarchy NHB ON NHA.parent_id = NHB.id JOIN testplan_tcversions ON testplan_tcversions.tcversion_id=NHA.id JOIN tcversions TCV ON TCV.id = testplan_tcversions.tcversion_id WHERE testplan_tcversions.testplan_id=7 AND NHB.parent_id=2 ORDER BY NHB.node_order Query failed: errorcode[0] errormsg:

------------------------------------------------------------------

running the query manually the following error is shown,

testlink=# SELECT DISTINCT 'TP1' AS tcprefix, NHB.name, NHA.parent_id AS testcase_id, TCV.tc_external_id, testplan_tcversions.urgency FROM nodes_hierarchy NHA JOIN nodes_hierarchy NHB ON NHA.parent_id = NHB.id JOIN testplan_tcversions ON testplan_tcversions.tcversion_id=NHA.id JOIN tcversions TCV ON TCV.id = testplan_tcversions.tcversion_id WHERE testplan_tcversions.testplan_id=7 AND NHB.parent_id=2 ORDER BY NHB.node_order;
ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
testlink=#


Everything worked fine on removing DISTINCT from the query.
TagsNo tags attached.
Database (MySQL,Postgres,etc)
Browser
PHP Version5.2.4-2ubuntu5.3
TestCaseID
QA Team - Task Workflow Status
Attached Fileszip file icon fix-1922.zip [^] (3,384 bytes) 2008-12-13 16:41

- Relationships

-  Notes
(0004824)
fman (administrator)
2008-12-11 01:53

Please detail what DB are you using.
first tests on windows xp with mysql gives no error.
(0004831)
sathyz (reporter)
2008-12-11 11:43

I am using Postgres: 8.3.5 (On Linux).
(0004842)
fman (administrator)
2008-12-12 01:38

Gotcha! as usual MySQl allows us to do right wrong SQL.
I will test with Postgres on Windows and try to fix.

- Issue History
Date Modified Username Field Change
2008-12-10 18:48 sathyz New Issue
2008-12-10 18:48 sathyz PHP Version => 5.2.4-2ubuntu5.3
2008-12-11 01:33 fman Status new => assigned
2008-12-11 01:33 fman Assigned To => fman
2008-12-11 01:53 fman Note Added: 0004824
2008-12-11 01:54 fman Status assigned => feedback
2008-12-11 11:43 sathyz Note Added: 0004831
2008-12-12 01:38 fman Note Added: 0004842
2008-12-13 16:40 fman Status feedback => resolved
2008-12-13 16:40 fman Fixed in Version => next development 1.8 RC3
2008-12-13 16:40 fman Resolution open => fixed
2008-12-13 16:41 fman File Added: fix-1922.zip
2009-01-20 05:19 mhavlat Status resolved => closed



Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker