MantisBT - TestLink
View Issue Details
0005403TestLinkRequirement Managementpublic2012-12-07 12:482013-05-26 18:52
frl 
fman 
normalminoralways
closedfixed 
LAMPDebian6.0
1.9.3 (2011 Q3 - bug fixing) 
1.9.5 (2012 Q4 - bug fixing) 
mySQL 5.1
N/A
5.3
READY FOR TESTING
0005403: method requirement_spec_mgr->get_by_title() causes a DB access error
It tried to use requirement_spec_mgr->get_by_title() to retrieve a req spec ID with its title.
I got an error 0001054 - Unknown column 'RSPEC' in 'field list'
with the following debug trace info
#1 database->fetchRowsIntoMap(/* Class:requirement_spec_mgr - Method: get_by_title */ SELECT RSPEC.id,testproject_id,RSPEC,doc_id,RSPEC.scope,RSPEC.total_req,RSPEC.type, RSPEC.author_id,RSPEC.creation_ts,RSPEC.modifier_id, RSPEC.modification_ts,NH.name AS title FROM req_specs RSPEC, nodes_hierarchy NH WHERE NH.name='TM-SODD' AND RSPEC.id=NH.id AND RSPEC.testproject_id=139 AND RSPEC.id=NH.id , id) called at [C:\Program Files\EasyPHP-5.3.6.1\www\testlink-1.9.3\lib\functions\requirement_spec_mgr.class.php:710]
0000002 requirement_spec_mgr->get_by_title(TM-SODD, 139) called at [C:\Program Files\EasyPHP-5.3.6.1\www\testlink-1.9.3\lib\api\extended_server.php:142]
...
Seems there is a syntax error in SQL query string : RSPEC,doc_id should be RSPEC.doc_id

I did not test with 1.9.4, but I also found this syntax error in 1.9.4 code (original published release).
N.B. this method seems not updated to support req_specs_revisions table in 1.9.4. Is it deprecated ?
No tags attached.
Issue History
2012-12-07 12:48frlNew Issue
2012-12-07 18:04fmanNote Added: 0017997
2012-12-07 18:04fmanTask Workflow StatusTBD => READY FOR TESTING
2012-12-07 18:04fmanStatusnew => resolved
2012-12-07 18:04fmanFixed in Version => 1.9.5 (2012 Q4 - bug fixing)
2012-12-07 18:04fmanResolutionopen => fixed
2012-12-07 18:04fmanAssigned To => fman
2013-05-26 18:52fmanStatusresolved => closed

Notes
(0017997)
fman   
2012-12-07 18:04   
>> N.B. this method seems not updated to support
>> req_specs_revisions table in 1.9.4. Is it deprecated ?
This method is intended to get by NAME TAKING IN CONSIDERATION
LATEST REVISION, that's why name is searched on Nodes Hierarchy table.

for TL 'THE REQUIREMENT' is always the latest revision.
Other revisions can not be used in anyway through user interface

In some sort the same applies to requirements WE DO NOT USE REQ VERSION OR REVISIONS to link req to test cases, we always USE LATEST VERSION+REVISION