Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004168TestLinkRequirement Managementpublic2011-01-13 09:252011-01-22 15:11
Reportersybren 
Assigned Toasimon 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9 (Prague) 
Fixed in Version1.9.1 (bug fixing) 
Summary0004168: Requirement Specifications navigator tree empty
DescriptionMy Requirement Specifications navigator tree remains empty after adding a requirement. I've narrowed it down to an error in lib/ajax/getrequirementnodes.php:

[>>][4d2ec2bbefa5e862936351][DEFAULT][/testlink/lib/ajax/getrequirementnodes.php][11/Jan/13 09:15:39]
        [11/Jan/13 09:15:39][ERROR][vfpq76566hhodec52svditef83][DATABASE]
                ERROR ON exec_query() - database.class.php
1052 - Column 'parent_id' in where clause is ambiguous - SELECT NHA.*, NT.description AS node_type, RSPEC.doc_id FROM nodes_hierarchy NHA JOIN node_types NT ON NHA.node_type_id=NT.id AND NT.description NOT IN ('testcase','testsuite','testcase_version','testplan') LEFT OUTER JOIN req_specs RSPEC ON RSPEC.id = NHA.id WHERE parent_id = 1 ORDER BY NHA.node_order
THE MESSAGE : SQL [8] executed [took 0.0003 secs][all took 0.0023 secs]:
                 SELECT NHA.*, NT.description AS node_type, RSPEC.doc_id FROM nodes_hierarchy NHA JOIN node_types NT ON NHA.node_type_id=NT.id AND NT.description NOT IN ('testcase','testsuite','testcase_version','testplan') LEFT OUTER JOIN req_specs RSPEC ON RSPEC.id = NHA.id WHERE parent_id = 1 ORDER BY NHA.node_order
Query failed: errorcode[1052]
        errormsg:Column 'parent_id' in where clause is ambiguous
[<<][4d2ec2bbefa5e862936351][DEFAULT][/testlink/lib/ajax/getrequirementnodes.php][11/Jan/13 09:15:39][11/Jan/13 09:15:39][took 0.007467 secs]

I've managed to fix this by changing the WHERE clause to "WHERE NHA.parent_id=1".
Steps To Reproduce1. Create a project with requirements enabled
2. Add some requirements
3. Visit http://hostname/testlink/lib/ajax/getrequirementnodes.php?root_node=1 [^]

Replace 1 with the database ID of the project.
Additional InformationIt may be the case that I have some extra columns in my database (I've upgraded from 1.7->1.8 and then 1.8->1.9) that cause this issue. However, the fix is very simple, and shouldn't hurt any other user.
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL 5.1
Browser
PHP Version
TestCaseID
QA Team - Task Workflow Status
Attached Files

- Relationships

-  Notes
(0013281)
asimon (developer)
2011-01-13 16:10

Thanks for the report! Fixed in 1.9 and head.
(0013361)
fman (administrator)
2011-01-22 15:11

1.9.1 Released

- Issue History
Date Modified Username Field Change
2011-01-13 09:25 sybren New Issue
2011-01-13 16:10 asimon Note Added: 0013281
2011-01-13 16:11 asimon Status new => resolved
2011-01-13 16:11 asimon Fixed in Version => 1.9.1 (bug fixing)
2011-01-13 16:11 asimon Resolution open => fixed
2011-01-13 16:11 asimon Assigned To => asimon
2011-01-22 15:11 fman Note Added: 0013361
2011-01-22 15:11 fman Status resolved => closed



Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker