Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004188TestLinkAPI - XMLRPCpublic2011-01-25 20:232015-05-01 07:42
Reporterdenjolras 
Assigned To 
PrioritynormalSeverityfeature requestReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9 (Prague) 
Fixed in Version1.9.14 (2015 Q3) 
Summary0004188: feature request - new method - getTestSuiteCustomFieldValue
DescriptionAs Custom field can be used for TestSuite,
could you add a "getTestSuiteCustomFieldDesignValue" Method ?

Thanks.
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL
Browser
PHP Version
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Files? file icon xmlrpc.class.php [^] (186,983 bytes) 2011-08-27 18:27
? file icon requirement_spec_mgr.class.php [^] (68,625 bytes) 2011-08-27 18:27
? file icon requirement_mgr.class.php [^] (101,795 bytes) 2011-08-27 18:28

- Relationships

-  Notes
(0013433)
fman (administrator)
2011-01-25 21:57

Reminder sent to: kinow

can you take care of this ?
(0013434)
kinow (reporter)
2011-01-26 00:00

@fman: Okeydokey, I know the TL API code already, so hopefully I won't take too long to finish it. BTW, A custom field can be associated to "Test Suite", "Test Plan", "Test Case" (already implemented), "Requirements Specification Document" and "Requirement". Should I write the code only for "Test Suite", or for all the other as well (i.e.: getTestSuiteCustomFieldDesignValue, getTestPlanCustomFieldDesignValue, getTestSuiteCustomFieldDesignValue, ...)?
Cheers
(0013445)
fman (administrator)
2011-01-27 10:04

JUST ONE generic
getCFvalue(itemtype,area)

itemtype: testsuite,testproject, and so on
area: design, execution, testplan design (see inside cfield_mgr class)
(0013447)
kinow (reporter)
2011-01-27 10:34

Got it. Just like we did for the upload attachment. Thanks.
(0013462)
fman (administrator)
2011-01-28 10:33

OK BUT JUST ONE method exposed:
getCFvalue() for anythings including test cases

and we will mantain for backwards compatibility the existent method that works ONLY on test cases

let me know if this is clear
(0013463)
kinow (reporter)
2011-01-28 11:47

Ok, I think I understood it. All I have to do is add getCFValue method and keep the old one for backward compatibility. No need to add the other methods (for test plan, test suite, etc).
(0014738)
denjolras (reporter)
2011-04-22 20:37

Any way I can help you ?
(0014739)
kinow (reporter)
2011-04-22 20:59

I'm working on this issue during Easter. It would be great if you could test it when the code is ready. :-)
(0015524)
Julian (reporter)
2011-07-18 15:43

Can this issue be resolved?
(0015528)
kinow (reporter)
2011-07-18 22:16

Not yet Julian, sorry, I stopped in the middle of the implementation. I can get the work on this issue back in a couple of days.
(0015574)
kinow (reporter)
2011-08-01 01:56

@Julian: Just a quick feedback, 90% done. Just finishing to test this new feature and preparing to synchronize and attach the sources here.
(0015580)
kinow (reporter)
2011-08-03 01:52

I finished a first implementation, could somebody analyse the code and merge it if everything is ok, please? It is attached to this issue.

The method getCustomFieldValue() is an internal method to retrieve custom field values. It is not exposed in the XMl-RPC. The existent getTestCaseCustomFieldDesignValue() method was kept intact for backward compatibility.

Now, besides getTestCaseCustomFieldDesignValue(), the API contains the following methods:

- getTestCaseCustomFieldExecutionValue()
- getTestCaseCustomFieldTestPlanDesignValue()
- getTestSuiteCustomFieldDesignValue()
- getTestPlanCustomFieldDesignValue()
- getReqSpecCustomFieldDesignValue()
- getRequirementCustomFieldDesignValue()

All these methods use getCustomFieldValue() to retrieve the custom field values in certain scopes.

Cheers, Bruno
(0015581)
kinow (reporter)
2011-08-03 01:53

Finished writing code.
(0015606)
kinow (reporter)
2011-08-06 15:01
edited on: 2011-08-23 00:50

Hi Francisco,

1. Will do it today :) thanks
2. My bad, the way I code in Java sometimes influences me badly
3. Will try to remember that, I was coding for so long that couldn't see the wood for the trees
4. I will search where I used project id and replace it with test project id, it makes more sense to use test project id instead of project id indeed, thanks!

I am mistakenly using the parameter name "version", however I am using it as node_id in the code. Perhaps it is just a matter of changing from "version" to "version_id"? I think I used the $versionNumberParamName because I couldn't find a $versionIDParamName... but probably I didn't search enough.

Give me some time to fix all these errors and I will upload the file here again, ok?

Thank you for putting your time into reviewing my code Francisco :)

Cheers, Bruno

(0015609)
fman (administrator)
2011-08-06 15:17

please use code you will get from 1.9 branch. just commited NOT TESTED
(0015611)
kinow (reporter)
2011-08-06 15:31

Hmm, I will have to figure out another way then, instead of asking for the version ID. I will start committing to 1.9 branch and will drop a note here in Mantis on the issues affected by my code for further review.

I am feeling more comfortable with TestLink code, so I guess I can start working more on TestLink.

Thanks for your help too.

This was the reason why I stopped contributing here for a while, but now I am already getting the gist of this new job and have more time to contribute to Open Source projects. Have a great weekend, I will review what was done in this issue and commit during the following days.
(0015711)
kinow (reporter)
2011-08-18 12:12

@fman: Sorry for taking long to reply Francisco. I will work on this issue on next Monday till Friday. I'm a little busy this week, but I'll have the nights off to work in TestLink by the next week. I believe we will be able to have this fixed for 1.9.4.
(0015735)
kinow (reporter)
2011-08-23 00:52

@fman: Hey Francisco,

Looks like you fixed most of things you pointed in your comments :-) Thanks!

Just to make sure, the only thing missing is replace versionId by the actual entity Id (test case id, test suite id, etc) plus a version number, when necessary, right?

All my code is synchronized against testlink_1_9 and I'm ready to start fixing it :)

Thanks again. Bruno.
(0015738)
fman (administrator)
2011-08-23 07:52

>>Just to make sure, the only thing missing is replace versionId by the actual >>entity Id (test case id, test suite id, etc) plus a version number, when >>necessary, right?
no this way, example for test case:
if you provide test case external ID + VERSION NUMBER then you NEED to GET TCVERSION ID

TestSuites HAS NO VERSIONS

for req you can have to use VERSION
for req spec you have to use REVISION

Think you need to give a look to HOW is managed when you work from GUI
(0015742)
kinow (reporter)
2011-08-23 09:01

Great! I will try to keep it as similar as the behavior from the GUI. Cold weather here, good to stay home and program PHP in TestLink :) Thanks Francisco.
(0015760)
kinow (reporter)
2011-08-27 18:33

@fman: Hi Francisco, I added revision to req spec, version to requirements and some extra verifications for test cases. As you suggested, I checked out how the UI works and also tried to stick with ID's available to the user in the screen (like version number, instead of version id). I tried to push my changes to testlink-code/testlink_1_9 but it seems like I cannot commit there, so I am attaching the modified files here.

Notes about this implementation:

I left the execution id to be used when retrieving custom fields for test case in executions. Is there a better way of doing so?

I only used existent messages, however there are no messages for revisions, for example. Would it be a problem?

Hope the code is better than the last time I attached here, if you find any flaw, please let me know and I will try to fix or code differently before 1.9.4 release.

I will be out of country from 31 August till beginning of September, so I'm afraid I won't be able to help testing this new version :-(

Thank you in advance!
Bruno
(0015798)
fman (administrator)
2011-09-05 21:00

first commit on 2.0
http://gitorious.org/testlink-ga/testlink-code/commit/3e792cdd0cb51c278464b59d83ae5f67a977cc56 [^]

test needed
(0016477)
franco.gonzalez (reporter)
2012-03-26 19:39

getCustomFieldValue the class method invokes the method xmlrpc.class.php 'checkCustomField' which is not implemented.
(0016489)
kinow (reporter)
2012-04-03 01:44

Hello Franco! I'll look at this issue tomorrow, I've been busy but this week I'm back working on TestLink :-) Get back to you soon with a feedback on this issue.

Bruno
(0016558)
kinow (reporter)
2012-04-11 07:09

Hi again Franco! You were right indeed, sorry for taking long to get back to you.

I believe I have fixed it, could you have a look at it, please?

Cheers, Bruno
(0016559)
fman (administrator)
2012-04-11 09:03

@kinow:
where is the fix ?
in gitorious repo ?
is not clear
(0016560)
kinow (reporter)
2012-04-11 09:13

@fman: My bad. Here are the links:

File:
branch testlink_1_9: https://gitorious.org/testlink-ga/testlink-code/blobs/3af56f46ecc0038647b8a0de253faba5515bd004/lib/api/xmlrpc.class.php#line4690 [^]
branch master: https://gitorious.org/testlink-ga/testlink-code/blobs/626e4fa23dab86c847d10facf660799d6786a314/lib/api/xmlrpc.class.php#line4560 [^]

Commits:
branch testlink_1_9: https://gitorious.org/testlink-ga/testlink-code/commit/3af56f46ecc0038647b8a0de253faba5515bd004 [^]
branch master: https://gitorious.org/testlink-ga/testlink-code/commit/626e4fa23dab86c847d10facf660799d6786a314 [^]

I tested with a simple Python client and it worked fine, no http errors, no warnings or whatsoever.
(0016561)
fman (administrator)
2012-04-11 18:04

Bruno:
please can you detail test cases you have run ?
(0023272)
Mr.Bricodage (updater)
2015-04-29 21:09

getTestSuiteCustomFieldDesignValue() is present with 1.9.14.
No feedback since 2012.

- Issue History
Date Modified Username Field Change
2011-01-25 20:23 denjolras New Issue
2011-01-25 21:55 fman Summary Could you add a "getTestSuiteCustomFieldDesignValue" Method ? => feature request - new method - getTestSuiteCustomFieldValue
2011-01-25 21:57 fman Note Added: 0013433
2011-01-26 00:00 kinow Note Added: 0013434
2011-01-26 00:00 kinow Assigned To => kinow
2011-01-26 00:00 kinow Status new => assigned
2011-01-27 10:04 fman Note Added: 0013445
2011-01-27 10:34 kinow Note Added: 0013447
2011-01-28 10:33 fman Note Added: 0013462
2011-01-28 11:47 kinow Note Added: 0013463
2011-04-22 20:37 denjolras Note Added: 0014738
2011-04-22 20:59 kinow Note Added: 0014739
2011-05-08 14:59 kinow Status assigned => work in progress
2011-07-18 15:43 Julian Note Added: 0015524
2011-07-18 22:16 kinow Note Added: 0015528
2011-08-01 01:56 kinow Note Added: 0015574
2011-08-03 01:52 kinow Note Added: 0015580
2011-08-03 01:53 kinow Note Added: 0015581
2011-08-03 01:53 kinow Status work in progress => assigned
2011-08-03 01:59 kinow File Added: xmlrpc.class.php
2011-08-06 15:01 kinow Note Added: 0015606
2011-08-06 15:02 kinow Note Edited: 0015606 View Revisions
2011-08-06 15:17 fman Note Added: 0015609
2011-08-06 15:31 kinow Note Added: 0015611
2011-08-18 12:12 kinow Note Added: 0015711
2011-08-22 22:45 kinow Status assigned => work in progress
2011-08-23 00:50 kinow Note Edited: 0015606 View Revisions
2011-08-23 00:52 kinow Note Added: 0015735
2011-08-23 07:52 fman Note Added: 0015738
2011-08-23 09:01 kinow Note Added: 0015742
2011-08-27 18:26 kinow File Deleted: xmlrpc.class.php
2011-08-27 18:27 kinow File Added: xmlrpc.class.php
2011-08-27 18:27 kinow File Added: requirements.inc.php
2011-08-27 18:27 kinow File Added: requirement_spec_mgr.class.php
2011-08-27 18:27 kinow File Deleted: requirements.inc.php
2011-08-27 18:28 kinow File Added: requirement_mgr.class.php
2011-08-27 18:33 kinow Note Added: 0015760
2011-08-27 18:34 kinow Status work in progress => assigned
2011-09-05 21:00 fman Note Added: 0015798
2012-03-26 19:39 franco.gonzalez Note Added: 0016477
2012-04-03 01:44 kinow Note Added: 0016489
2012-04-11 07:09 kinow Note Added: 0016558
2012-04-11 07:09 kinow Status assigned => feedback
2012-04-11 09:03 fman Note Added: 0016559
2012-04-11 09:13 kinow Note Added: 0016560
2012-04-11 18:04 fman Note Added: 0016561
2013-04-25 17:30 fman Category TL API => XMLRPC API
2013-04-25 17:30 fman Category XMLRPC API => API - XMLRPC
2015-04-29 21:09 Mr.Bricodage Note Added: 0023272
2015-05-01 07:42 fman QA Team - Task Workflow Status => READY FOR TESTING
2015-05-01 07:42 fman Status feedback => closed
2015-05-01 07:42 fman Assigned To kinow =>
2015-05-01 07:42 fman Resolution open => fixed
2015-05-01 07:42 fman Fixed in Version => 1.9.14 (2015 Q3)



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker