Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002719TestLinkAPI - XMLRPCpublic2009-07-13 03:012011-01-22 15:11
Reporterglimchb 
Assigned Tofman 
PrioritynormalSeverityfeature requestReproducibilityN/A
StatusclosedResolutionduplicate 
PlatformOSOS Version
Product Version1.8.3 
Fixed in Version1.9.1 (bug fixing) 
Summary0002719: please expose new API function : get_full_path_verbose
Description
Hello,

our company implements automatic tests
we found out that there is a function missing in order to implement it...

the implementation is something like this:

public function getFullPath($args)
{
$nodes = $this->args[self::$nodes];
$nodes_types = $this->tprojectMgr->tree_manager->get_full_path_verbose($nodes );
return $nodes_types;
}

TagsNo tags attached.
Database (MySQL,Postgres,etc)
Browser
PHP Version
TestCaseID
QA Team - Task Workflow Status
Attached Filestxt file icon patch.txt [^] (1,377 bytes) 2009-07-23 03:18 [Show Content]

- Relationships
duplicate of 0003993closedfman [API] getFullPath can receive a list of node ids instead of one node 

-  Notes
(0007591)
glimchb (reporter)
2009-07-17 02:31

I can commit the complete function implementation. how?
(0007622)
fman (administrator)
2009-07-23 00:23

attach your code here well commented in changes places, in zip format
(0007626)
glimchb (reporter)
2009-07-23 03:19
edited on: 2009-07-23 13:55

I've submitted patch file for xmlrpc.php, notify if it is not enough

(0007647)
fman (administrator)
2009-07-27 22:18

code reviewed and changed.
(0007654)
glimchb (reporter)
2009-07-28 12:22
edited on: 2009-07-28 12:25

function tree_manager->get_full_path_verbose() works with array, not single node

why in your new implementation of api getFullPath() there is a restriction on usage to be only 1 node id

relevant line is:

if( !is_int($nodeID) || $nodeID <= 0 )
{
    $msg = $msg_prefix . sprintf(NODEID_IS_NOT_INTEGER_STR);
    $this->errors[] = new IXR_Error(NODEID_IS_NOT_INTEGER, $msg);
    $status_ok=false;
}

I think it should do this check for each given node in array if $nodeID is an array

(0007655)
fman (administrator)
2009-07-28 13:03

I know very well how get_full_path_verbose() works (I've written it).
I though that was not easy to report an error on API when one or more nodes on array of nodes has problem.
I do not remember seen an special way to manage this in you implementation.
Then I can add support for array, but knowing that error reporting will be not good.
(0007672)
glimchb (reporter)
2009-07-29 02:08

1. I meant no disrespect

2. you are right, I didn't implement this because internal function get_full_path_verbose() will return null (i almost sure :) in case of problem in one of the nodes

3. the alternative error reporting can be done like this:

for each nodeID in nodes_parameters, do:
    if( !is_int($nodeID) || $nodeID <= 0 )
    {
        $msg = $msg_prefix . sprintf(NODEID_IS_NOT_INTEGER_STR). $nodeID;
        $this->errors[] = new IXR_Error(NODEID_IS_NOT_INTEGER, $msg);
        $status_ok=false;
        break;
    }

note the addition to error message of the relevant member of the nodes array ($nodeId) that caused an error

what say you?
(0007676)
fman (administrator)
2009-07-29 14:27

I will review and see if can be the solution.

Regards
(0012394)
glimchb (reporter)
2010-11-10 21:16

note this isssue is duplicated http://mantis.testlink.org/view.php?id=3993 [^]
(0013387)
fman (administrator)
2011-01-22 15:11

1.9.1 Released

- Issue History
Date Modified Username Field Change
2009-07-13 03:01 glimchb New Issue
2009-07-17 02:31 glimchb Note Added: 0007591
2009-07-23 00:22 fman Status new => assigned
2009-07-23 00:22 fman Assigned To => fman
2009-07-23 00:23 fman Note Added: 0007622
2009-07-23 03:19 glimchb File Added: patch.txt
2009-07-23 03:19 glimchb Note Added: 0007626
2009-07-23 13:55 glimchb Note Edited: 0007626
2009-07-27 22:18 fman Note Added: 0007647
2009-07-27 22:18 fman Status assigned => resolved
2009-07-27 22:18 fman Fixed in Version => 1.9 (DEV)
2009-07-27 22:18 fman Resolution open => fixed
2009-07-28 12:22 glimchb Note Added: 0007654
2009-07-28 12:22 glimchb Status resolved => assigned
2009-07-28 12:22 glimchb Resolution fixed => reopened
2009-07-28 12:25 glimchb Note Edited: 0007654
2009-07-28 13:03 fman Note Added: 0007655
2009-07-29 02:08 glimchb Note Added: 0007672
2009-07-29 14:27 fman Note Added: 0007676
2010-11-10 21:16 glimchb Note Added: 0012394
2010-12-19 16:15 fman Relationship added duplicate of 0003993
2010-12-19 16:15 fman Status assigned => resolved
2010-12-19 16:15 fman Fixed in Version 1.9 Beta 2 => 1.9.1 (bug fixing)
2010-12-19 16:15 fman Resolution reopened => duplicate
2011-01-22 15:11 fman Note Added: 0013387
2011-01-22 15:11 fman 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 - 2019 MantisBT Team
Powered by Mantis Bugtracker