Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002998TestLinkNew Featurepublic2009-12-10 13:062010-05-01 20:34
Reportertrcjr 
Assigned Tofman 
PrioritynormalSeverityfeature requestReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Fixed in Version1.9 Beta 2 
Summary0002998: Contribution: API - added getTestSuiteByID(), reportTCResult(), now accepts custom fields as an optional parameter
DescriptionI needed the ability to get a Test Suite by ID. I also needed the ability to report custom fields when posting test results.

I originally added this to 1.46.2.1 but have checked out a copy from CVS, reverted lib/api/xmlrpc.php to 1.46.2.1 and merged in my changes. I updated lib/api/xmlrpc.php to HEAD (1.72) and resolved the few conflicts.
Additional InformationThe patch was created with: diff -rupN xmlrpc.php.1.72 xmlrpc.php >getTestSuiteByID_and_reportTCResult_custom_fields.patch
TagsNo tags attached.
Database (MySQL,Postgres,etc)
Browser
PHP Version
TestCaseID
QA Team - Task Workflow Status
Attached Filespatch file icon getTestSuiteByID_and_reportTCResult_custom_fields.patch [^] (7,167 bytes) 2009-12-10 13:06 [Show Content]
? file icon xmlrpc.php [^] (121,434 bytes) 2009-12-11 02:20

- Relationships

-  Notes
(0008453)
fman (administrator)
2009-12-10 14:44

please post complety file no patchss, thanks
(0008455)
fman (administrator)
2009-12-10 14:49

>> I also needed the ability to report custom fields when posting test results.
sorry but this was already present, here documentation present on code on HEAD CVS
=============================================================================
     * @param string $args["customfields"] - optional
     * contains an map with key:Custom Field Name, value: value for CF.
     * VERY IMPORTANT: value must be formatted in the way it's written to db,
     * this is important for types like:
     *
     * DATE: strtotime()
     * DATETIME: mktime()
     * MULTISELECTION LIST / CHECKBOX / RADIO: se multipli selezione ! come separatore
     *
     *
     * these custom fields must be configured to be writte during execution.
     * If custom field do not meet condition value will not be written
=============================================================================


 what have you added or changed ?
(0008461)
trcjr (reporter)
2009-12-10 20:52

I also added getTestSuiteByID() which I pasted below, if it would be better I can post the full xmlrpc.php.

    /**
     * Return a TestSuite by ID
     *
     * @param
     * @param struct $args
     * @param string $args["devKey"]
     * @param int $args["testsuiteid"]
     * @return mixed $resultInfo
     *
     * @access public
     */
    public function getTestSuiteByID($args)
    {
        $operation=__FUNCTION__;
        $msg_prefix="({$operation}) - ";

        $this->_setArgs($args);
        $status_ok=$this->_runChecks(array('authenticate','checkTestSuiteID'),$msg_prefix);

        $details='simple';
        $key2search=self::$detailsParamName;
        if( $this->_isParamPresent($key2search) )
        {
            $details=$this->args[$key2search];
        }

        if($status_ok && $this->userHasRight("mgt_view_tc"))
        {
            $testSuiteID = $this->args[self::$testSuiteIDParamName];
            $tsuiteMgr = new testsuite($this->dbObj);
            return $tsuiteMgr->get_by_id($testSuiteID);

        }
        else
        {
            return $this->errors;
        }
    }
(0008462)
fman (administrator)
2009-12-10 22:48

You have not answer my question.
I will consider to add this get new method, but reportTC will remain as is
(0008466)
trcjr (reporter)
2009-12-11 02:20

I'm not sure I understand the question then. Please disregard the changes to reportTCResult() as I had not realized the functionality had already been added between release 1.8.4 and HEAD. I did not look before merging my original changes in.

I've attached xmlrpc.php is based on HEAD (1.72) that has only adds getTestSuiteByID().

- Issue History
Date Modified Username Field Change
2009-12-10 13:06 trcjr New Issue
2009-12-10 13:06 trcjr File Added: getTestSuiteByID_and_reportTCResult_custom_fields.patch
2009-12-10 14:44 fman Note Added: 0008453
2009-12-10 14:44 fman Status new => assigned
2009-12-10 14:44 fman Assigned To => fman
2009-12-10 14:49 fman Note Added: 0008455
2009-12-10 20:52 trcjr Note Added: 0008461
2009-12-10 22:48 fman Note Added: 0008462
2009-12-11 02:20 trcjr Note Added: 0008466
2009-12-11 02:20 trcjr File Added: xmlrpc.php
2009-12-12 23:09 fman Status assigned => resolved
2009-12-12 23:09 fman Fixed in Version => 1.9 (DEV)
2009-12-12 23:09 fman Resolution open => fixed
2010-05-01 20:34 fman Status resolved => closed



Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker