MantisBT - TestLink
View Issue Details
0005346TestLinkBug Tracking Systems Integrationpublic2012-11-15 12:112012-11-23 13:35
1.9.4 (2012 Q3 - bug fixing) 
1.9.5 (2012 Q4 - bug fixing) 
IE, Firefox, Chrome
0005346: Can't associate Bugzilla bugs to Test Cases using xmlrpc interface
While using the xmlrpc interface, after running a test case I try to add a Bugzilla bug ID and Testlink calls the addBug.php which returns only this:

object(stdClass)#152 (6) { ["IDHTMLString"]=> string(14) "5883 : " ["statusCode"]=> int(0) ["statusVerbose"]=> string(11) "UNCONFIRMED" ["statusHTMLString"]=> string(14) "[UNCONFIRMED] " ["summaryHTMLString"]=> string(18) "this is my summary" ["summary"]=> string(18) "this is my summary" }

By the info I get, I can assert that the connection to Bugzilla is being made but the bug information is not associated to Test Case.
1 - Setup the Bugzilla xmlrpc interface on the GUI:

<!-- Template bugzillaxmlrpcInterface -->
<uribase>http://myBugzillaURL/</uribase> [^]

2 - Execute a Test Case
3 - Click on the Bug icon
4 - add a bug ID and click on "add bug"
I also tried to input a bug ID that does not exist and I was expecting an error message but instead I got:

object(stdClass)#152 (6) { ["IDHTMLString"]=> string(16) "100000 : " ["statusCode"]=> int(0) ["statusVerbose"]=> NULL ["statusHTMLString"]=> string(3) "[] " ["summaryHTMLString"]=> NULL ["summary"]=> NULL }
No tags attached.
png bugID5338.PNG (14,667) 2012-11-15 12:11

png bugID5338_1.PNG (13,323) 2012-11-15 12:14

png issue-5346.png (15,859) 2012-11-16 17:42
Issue History
2012-11-15 12:11matNew Issue
2012-11-15 12:11matFile Added: bugID5338.PNG
2012-11-15 12:14matFile Added: bugID5338_1.PNG
2012-11-15 14:35fmanNote Added: 0017823
2012-11-15 14:36fmanNote Edited: 0017823bug_revision_view_page.php?bugnote_id=17823#r2196
2012-11-15 16:23matNote Added: 0017824
2012-11-15 16:24matNote Edited: 0017824bug_revision_view_page.php?bugnote_id=17824#r2198
2012-11-15 18:21fmanNote Added: 0017825
2012-11-15 21:34matNote Added: 0017826
2012-11-16 17:01fmanNote Added: 0017828
2012-11-16 17:09fmanNote Edited: 0017828bug_revision_view_page.php?bugnote_id=17828#r2200
2012-11-16 17:29fmanNote Added: 0017829
2012-11-16 17:40fmanNote Added: 0017830
2012-11-16 17:41fmanNote Edited: 0017830bug_revision_view_page.php?bugnote_id=17830#r2202
2012-11-16 17:42fmanFile Added: issue-5346.png
2012-11-16 17:42fmanAssigned To => fman
2012-11-16 17:42fmanStatusnew => feedback
2012-11-23 11:01matNote Added: 0017883
2012-11-23 11:01matStatusfeedback => assigned
2012-11-23 13:35fmanNote Added: 0017884
2012-11-23 13:35fmanTask Workflow StatusTBD => READY FOR TESTING
2012-11-23 13:35fmanStatusassigned => closed
2012-11-23 13:35fmanResolutionopen => fixed
2012-11-23 13:35fmanFixed in Version => 1.9.5 (2012 Q4 - bug fixing)

2012-11-15 14:35   
(edited on: 2012-11-15 14:36)
Please upgrade to latest patches (there is an issue with the link 0005193), retest and provide feedback

2012-11-15 16:23   
(edited on: 2012-11-15 16:24)
I upgraded to version "TestLink DEVELOPMENT NEXT 1.9.4 FIX" like you said but the issue persists.
The only thing that has changed was the case where the Bug ID does not exist. Now, bugAdd.php returns only the word "NULL".

2012-11-15 18:21   
Is not clear if you have added debug code to get this result on screen.
Important thing: TL does not create a BUG on Bugzilla it checks existence on Bugzilla and if check is OK add it to TL.

Steps has to be

1. creat N issue on BUGZILLA, write down issues number
2. go to tl, execute test case, said failed, use button to add issue
3. after update ok info has to be present on TL
2012-11-15 21:34   
I understand the steps.
I was just explaining two use cases to you.
But I will describe to you what I get following the steps you described:

1 - I register the bug on bugzilla and i take note of the number. (BugID 5883, for instance)
2 - I register the Test Case has failed, I use button add issue, I put fill the BugID box and I click on the button add bug
3 - I get the result you see on the printscreen: bugID5338.PNG [^] (14,667 bytes) 2012-11-15 04:11
After that I close the window, I go back to the TestLink and even after refreshing the webpage the bug record isn't there. Also, I go to test reports and I try to get a report of the bugs opened and TesteLink gives me a message saying that there are no bugs registered. If you want, later I can post more print-screens to give you more details.
2012-11-16 17:01   
(edited on: 2012-11-16 17:09)
I'm going to do following tests

1. get Latest TurnKeyLinux Appliance with Bugzilla
apache2 2.2.16-6+squeeze7
mysql-server 5.1.63-0+squeeze1
phpmyadmin 4:3.3.7-7

2. configure my TL to use it

2012-11-16 17:29   
First test - using a simple program
Run it from:
[TL INST DIR]/lib/issuetrackerintegration/code_testing/

BEFORE RUNNING THE TEST (from folder )I've created TWO additional Products on bugzilla.
THIS REQUIRES a modified version of bugzillaxmlrpcInterface.class.php,
that will be commited ASAP.

 * TestLink Open Source Project - [^]
 * This script is distributed under the GNU General Public License 2 or later.

$cfg = "<issuetracker>\n" .
            "<username></username>\n" .
            "<password>admin</password>\n" .
            "<uribase></uribase>\n" [^] .

echo '<hr>
echo "Testing BST Integration - bugzillaxmlrpcInterface ";
echo '<hr>
echo "Configuration settings
echo "
<xmp>" . $cfg . "</xmp>

echo '<hr>


$its = new bugzillaxmlrpcInterface(185,$cfg);
$dx = $its->getAccessibleProducts();
echo '
$dx = $its->getProduct(3);
echo '
2012-11-16 17:40   
(edited on: 2012-11-16 17:41)
Issue found there is a DIE() inside the checkid* method
Give a look to commit and change you code accordingly (you have to remove
two lines - give a look to attached image)
TestLink 1.9.4 [^]

2012-11-23 11:01   
After deleting those only 2 lines it stared to work fine.
I was testing it for the whole week.
2012-11-23 13:35   
There is a good new feature: CREATE AUTOMATICALLY ISSUES ON BUGZILLA, give a look.