Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002577TestLinkAPI - XMLRPCpublic2009-06-05 20:202010-01-13 21:42
Reporterheijdena 
Assigned Tofman 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.8.2 
Fixed in Version1.8.4 
Summary0002577: method "getProjectTestPlans" from "TestlinkAPI->TestlinkXMLRPCServer" returns with wrong array structure
DescriptionIt seems that the array containing the testplans becomes one level too deep.

In my example i have 2 testplans inside the project.

The array indeed has 2 entries. But each of these only contain a single entry, with an index which seems to match with the "testplanid". At this index is the actual array with information about the testplan. Please see the attached sheet for clarification.
Additional InformationThe output for the code below (from dBug.php) i have captured in the attached xls sheet.
 
------------------------------------------------
php code example
------------------------------------------------
$client = new IXR_Client($server_url);
if(!$client->query('tl.getProjectTestPlans', $data)){
    echo "something went wrong - " . $client->getErrorCode() . " - " . $client->getErrorMessage();
    die();
}
else $currentTestPlans = $client->getResponse();

new dBug($data);
echo "
";
new dBug($currentTestPlans);
echo "
";
TagsNo tags attached.
Database (MySQL,Postgres,etc)
BrowserInternet Explorer 7.0.5730.13
PHP Version5.2.8
TestCaseID
QA Team - Task Workflow Status
Attached Filesxls file icon getProjectTestPlansDbugOutput.xls [^] (20,480 bytes) 2009-06-05 20:20

- Relationships

-  Notes
(0007173)
heijdena (reporter)
2009-06-05 21:12
edited on: 2009-06-05 22:37

In file "xmlrpc.php" the actual "return" command for function "getProjectTestPlans" is changed

from:
return array($testProjectObj->get_all_testplans($testProjectID));

to:
return $testProjectObj->get_all_testplans($testProjectID);

This partly seems to fix the issue, but still the index in the array is matching the testplanid instead of simply 0,1,2,etc


Now i also changed a line inside file: "testproject.class.php" at function "get_all_testplans"

from:
$map = $this->db->fetchRowsIntoMap($sql,'id');

to:
$map = $this->db->get_recordset($sql);



Now it bahaves as i expect. But...

i strongly have the feeling by now you are doing something different on purpose.
So please enlighten me.

regards,
Anthony

(0007179)
fman (administrator)
2009-06-06 00:02

we will analyse but till we do not be sure your change will not be propagated

- Issue History
Date Modified Username Field Change
2009-06-05 20:20 heijdena New Issue
2009-06-05 20:20 heijdena File Added: getProjectTestPlansDbugOutput.xls
2009-06-05 20:20 heijdena Browser => Internet Explorer 7.0.5730.13
2009-06-05 20:20 heijdena PHP Version => 5.2.8
2009-06-05 21:12 heijdena Note Added: 0007173
2009-06-05 21:13 heijdena Note Edited: 0007173
2009-06-05 21:20 heijdena Note Edited: 0007173
2009-06-05 22:37 heijdena Note Edited: 0007173
2009-06-06 00:01 fman Status new => assigned
2009-06-06 00:01 fman Assigned To => fman
2009-06-06 00:02 fman Note Added: 0007179
2009-07-27 23:59 fman Status assigned => resolved
2009-07-27 23:59 fman Fixed in Version => 1.8.4 (bug fixing)
2009-07-27 23:59 fman Resolution open => fixed
2010-01-13 21:42 mhavlat Status resolved => closed
2013-04-25 17:30 fman Category TL API => XMLRPC API
2013-04-25 17:30 fman Category XMLRPC API => API - XMLRPC



Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker