MantisBT - TestLink
View Issue Details
0008494TestLinkRequirement Managementpublic2018-11-28 16:302018-11-30 13:56
acoloma 
fman 
normalminoralways
resolvedfixed 
WindowsWindows Server 2012 R26.3.9600
1.9.18 (2018 Q3) 
1.9.19 (2019 Q1) 
MySQL
Edge, Chrome, IE, Firefox
7.1.2
READY FOR TESTING
0008494: Copy Requirement displays a SQL Statement
When copying a requirement, a SQL Statement is displayed above the "Requirement : Activity History - General functionality" bar
1. Click on Requirement button on the top toolbar
2. Select a requirement
3. Click on Actions (gear) below the "Requirement : Activity History - General functionality" bar
4. Click Copy and select destination target
5. Click Copy button
Below is the SQL Statement produced.

/* Class:requirement_mgr - Method: getGoodForReqVersion */ SELECT REQ.id,REQ.id AS req_id,REQ.req_doc_id, NHREQ.name AS title, RCOV.is_active, RCOV.testcase_id,RCOV.tcversion_id, NHRS.name AS req_spec_title, REQV.id AS req_version_id, REQV.version FROM requirements REQ JOIN req_specs RSPEC ON REQ.srs_id = RSPEC.id JOIN req_coverage RCOV ON RCOV.req_id = REQ.id JOIN nodes_hierarchy NHRS ON NHRS.id=RSPEC.id JOIN nodes_hierarchy NHREQ ON NHREQ.id=REQ.id JOIN req_versions REQV ON RCOV.req_version_id=REQV.id WHERE RCOV.req_version_id IN (509925)
Requirement : Activity History - General functionality

No tags attached.
png Copy-Requirement-SQL_Statement.png (113,891) 2018-11-28 16:30
http://mantis.testlink.org/file_download.php?file_id=5048&type=bug
png
Issue History
2018-11-28 16:30acolomaNew Issue
2018-11-28 16:30acolomaFile Added: Copy-Requirement-SQL_Statement.png
2018-11-29 07:27hughkayNote Added: 0028278
2018-11-29 07:29hughkayNote Edited: 0028278bug_revision_view_page.php?bugnote_id=28278#r5655
2018-11-29 16:21fmanNote Added: 0028281
2018-11-29 16:21fmanQA Team - Task Workflow Status => READY FOR TESTING
2018-11-29 16:21fmanStatusnew => resolved
2018-11-29 16:21fmanFixed in Version => 1.9.19 (2019 Q1)
2018-11-29 16:21fmanResolutionopen => fixed
2018-11-29 16:21fmanAssigned To => fman
2018-11-29 16:22acolomaNote Added: 0028282
2018-11-29 16:25acolomaNote Added: 0028283
2018-11-30 06:32hughkayNote Added: 0028285
2018-11-30 06:38hughkayNote Edited: 0028285bug_revision_view_page.php?bugnote_id=28285#r5659
2018-11-30 13:56fmanNote Added: 0028286

Notes
(0028278)
hughkay   
2018-11-29 07:27   
(edited on: 2018-11-29 07:29)
Bug is confirmed from my side.
@fman: Please have a look at lib/functions/requirement_mgr.class.php within function "getGoodForReqVersion", line 4916: "echo $sql;"

This debug line should be removed or commented out.

(0028281)
fman   
2018-11-29 16:21   
Issue has been already fixed on latest code on github.
Suggestion always is to give a look to simular issues before reporting.
And having a sandbox installation that you can update periodically with latest code fron github
(0028282)
acoloma   
2018-11-29 16:22   
Thanks a lot hughkay!
Your fix worked.
(0028283)
acoloma   
2018-11-29 16:25   
Thanks fman!
Noted.
(0028285)
hughkay   
2018-11-30 06:32   
(edited on: 2018-11-30 06:38)
@fman: >>Issue has been already fixed on latest code on github.<<

When did you fix it? I can still see the debug code line on latest code version: https://github.com/TestLinkOpenSourceTRMS/testlink-code/blob/testlink_1_9/lib/functions/requirement_mgr.class.php [^] , line 4916.

(0028286)
fman   
2018-11-30 13:56   
Oops seems the commit has not been pushed.
I'm sorry.
Thanks for your help.