Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007282TestLinkAPI - XMLRPCpublic2015-09-29 20:322016-09-08 15:13
Reporterlczub 
Assigned Tofman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9.14 (2015 Q3) 
Fixed in Version1.9.15 (2015 Q4) 
Summary0007282: API -XMLRPC - updateTestSuiteCustomFieldDesignValue raise database error
DescriptionIt seams, that new TL 1.9.14 api method updateTestSuiteCustomFieldDesignValue uses a fix nodeID=0 instead a specific testsuiteid, what raise an internal database failure.

Steps To Reproducecall xmlrpc api method 'updateTestSuiteCustomFieldDesignValue' with arguments
- testprojectid = 12638
- testsuiteid = 12642
- customfields = dictionary with key / value pair: 'cf_ts_string' / 'A custom TestSuite value set via api'

This api call returns an invalid xml response and the event viewer has logged following error:

Log level ERROR
Timestamp 29/09/2015 21:59:29
Source DATABASE
Description ERROR ON exec_query() - database.class.php
0 - - /* Class:cfield_mgr - Method: design_values_to_db */ INSERT INTO cfield_design_values ( field_id, node_id, value ) VALUES ( 57, 0, 'A custom TestSuite value set via api' )
THE MESSAGE : /* Class:cfield_mgr - Method: design_values_to_db */ INSERT INTO cfield_design_values ( field_id, node_id, value ) VALUES ( 57, 0, 'A custom TestSuite value set via api' ) Query failed: errorcode[0] errormsg:

It seams, that the wrong nodeiD=0 is used instead the testsuitid 12642.
A corrected SQL statement with nodeid=12642(=testsuiteid) creates the expected customer field value:
- INSERT INTO cfield_design_values ( field_id, node_id, value ) VALUES ( 57, 12642, 'A custom TestSuite value set via api' )
Additional Informationproblem is reproducible with release 1.9.14 and current github dev commit 1bac77a

Debug Info out of xml response
#0 database->exec_query(/* Class:cfield_mgr - Method: design_values_to_db */ INSERT INTO cfield_design_values ( field_id, node_id, value ) VALUES\t( 57, 0, 'A custom TestSuite value set via api' )) called at [/usr/local/www/testlink-1.9.14/lib/functions/cfield_mgr.class.php:822]
#1 cfield_mgr->design_values_to_db(Array ([custom_field_0_57] => A custom TestSuite value set via api), ) called at [/usr/local/www/testlink-1.9.14/lib/api/xmlrpc/v1/xmlrpc.class.php:7203]
0000002 TestlinkXMLRPCServer->updateTestSuiteCustomFieldDesignValue("
TagsNo tags attached.
Database (MySQL,Postgres,etc)postgresql 9.2.111
Browser
PHP Version
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Files

- Relationships

-  Notes
(0024066)
fman (administrator)
2015-09-30 05:45

it's very strange, may be some other fix done after specific fix to implement this feature produce this effect.
Are you able to reproduce ON EVERY CALL ?
(0024073)
lczub (reporter)
2015-09-30 18:52

I get these errors on every call against my local TL installation on postgresql.

Running this test against your public demo application (testprojectid = 6997 testsuiteid = 7001), does not return invalid xml data. But it also does not change / set the customer field value for the test suite.

Unfortunately, the event viewer of the public demo application presents only a blank white page, so I could not control if these calls has raise some other events.

I will try to debug with my local TL installation and let you know, when I have additional informations.
(0024074)
lczub (reporter)
2015-09-30 19:54

With following change, updateTestSuiteCustomFieldDesignValue() works

OLD - creates error, cause $itemID is not defined
  $cfieldMgr->design_values_to_db($hash,$itemID);
Mod, which works
  $cfieldMgr->design_values_to_db($hash,$args[self::$testSuiteIDParamName]);
(0024075)
fman (administrator)
2015-09-30 20:23

thanks for debug, want to understand why fix was bad applied on this version
(0024076)
fman (administrator)
2015-09-30 20:33

https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/ce1fa7f09dd667863a347b56b218cd345098ec0d [^]
(0024080)
fman (administrator)
2015-10-03 08:27

https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/d4dd54009f9d92ae8ecee853ae41b893f7a90a8f [^]
(0025323)
fman (administrator)
2016-09-08 15:13

1.9.15 Released - 2016-09-08

- Issue History
Date Modified Username Field Change
2015-09-29 20:32 lczub New Issue
2015-09-30 05:45 fman Note Added: 0024066
2015-09-30 05:46 fman Assigned To => fman
2015-09-30 05:46 fman Status new => feedback
2015-09-30 18:52 lczub Note Added: 0024073
2015-09-30 18:52 lczub Status feedback => assigned
2015-09-30 19:54 lczub Note Added: 0024074
2015-09-30 20:23 fman Note Added: 0024075
2015-09-30 20:33 fman Note Added: 0024076
2015-09-30 20:33 fman QA Team - Task Workflow Status => TBD
2015-09-30 20:34 fman Status assigned => feedback
2015-10-03 08:27 fman Note Added: 0024080
2015-10-03 08:28 fman QA Team - Task Workflow Status TBD => READY FOR TESTING
2015-10-03 08:28 fman Status feedback => resolved
2015-10-03 08:28 fman Fixed in Version => 1.9.15 (2015 Q4)
2015-10-03 08:28 fman Resolution open => fixed
2016-09-08 15:13 fman Note Added: 0025323
2016-09-08 15:13 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker