Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004467TestLinkImport results XML formatpublic2011-05-12 00:392012-09-20 21:40
Reporterfrl 
Assigned Tofman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformTeslinkOSWindows & Linux-DebianOS Version1.9.1
Product Version1.9.2 (2011 Q2 - bug fixing) 
Fixed in Version1.9.3 (2011 Q3 - bug fixing) 
Summary0004467: Import XML Results function do not import <bug_id> elements
DescriptionUsing XML format to import TC results like in TL distribution example
.\docs\file_examples\results\result-3.xml

I did not get records corresponding to <bug_id> elements created in DB
Steps To Reproduce- define an XML result file with bug_id elements
(.\docs\file_examples\results\result-3.xml used for my test)
- import this file (Test Execution -> Import XML results)
- check execution_bugs table in DB after import (new bug records not created)
Additional InformationNOTA : seems to come from check_exec_values() in lib/results/resultsImport.php
- line 616 : $execValues['bug_id'] = isset($execValues['bug_id']) ? trim((string) $execValues['bug_id']) : '';
=> this empties $execValues['bug_id'] (which is an array of string)

see proposed fix marked with // BUG FRL and // END BUG FRL in attached file
(tested with same XML file => the bug records are well created in DB)
TagsNo tags attached.
Database (MySQL,Postgres,etc)mysql5.1
BrowserIE8
PHP Version5.2
TestCaseID
QA Team - Task Workflow StatusTBD
Attached Files? file icon resultsImport.php [^] (19,236 bytes) 2011-05-12 00:39
xml file icon testimportres.xml [^] (693 bytes) 2011-05-12 17:53
jpg file icon testresultimport.jpg [^] (32,168 bytes) 2011-05-12 17:53

- Relationships
child of 0004337closedfman Availables Fixes for 1.9.2 (Prague) 

-  Notes
(0014832)
fman (administrator)
2011-05-12 06:02
edited on: 2011-05-12 06:05

we need also: test plan full contents where you have tried to import the results

our example tries to add bug to test case with internal ID 1335, do you have forced on you db this ID ?

please explain better if you have created a NEW xml file using our example or OUR XML file without changes.

if you have used a file you created/changed add the file here

(0014850)
frl (reporter)
2011-05-12 18:26

You are right, I used result-3.xml to be sure of XML format of imported file.
So I joined modified file (testimportres.xml) and hardcopy of TL import results
(NOTE that TL indicates - Imported! even if bug_id was not created)

Test was made on a project using "RP-TC-" prefix, having the 3 TCs (RP-TC-1, RP-TC-2 and RP-TC-3) defined and linked to a test plan TP executed for the test (Import XML Results) - TP was not executed before

With original resultsImport.php file (distribution TL 1.9.2), the table of bugs is not displayed in TC execution screen, and after a check in DB, the 3 records in execution_bugs (TL-4 for RP-TC-2 , TL-1 and TL-3 for RP-TC-3) for were not created.


With the modified resultsImports.php file, redoing the same test, I get the 3 new records in execution_bugs table and the table of bugs is correctly displayed after refresh on TC execution screen.

Trying to analyze the pbm, I found thet test at line 616 in original resultsImport.php file changed $execValues['bug_id'], so we do not enter into the loop just after as expected :

For example "RP-TC-2" : print_r($execValues['bug_id'],true) returns
 "Array( [0] => 'TL-4' )" before line 616
 "Array" just after line 616
(using PHP Version 5.2.6-1+lenny10 on Linux Debian 5 distribution)
(0014854)
fman (administrator)
2011-05-12 19:23
edited on: 2011-05-12 19:26

thanks for help

fixed 1.9
http://gitorious.org/testlink-ga/testlink-code/commit/77e6e88ffee4cade8648dc80de5a53988c38cd69 [^]

fixed also on 2.0

(0015451)
fman (administrator)
2011-07-02 13:49

1.9.3 released

- Issue History
Date Modified Username Field Change
2011-05-12 00:39 frl New Issue
2011-05-12 00:39 frl File Added: resultsImport.php
2011-05-12 06:02 fman Note Added: 0014832
2011-05-12 06:02 fman Assigned To => fman
2011-05-12 06:02 fman Status new => assigned
2011-05-12 06:05 fman Note Edited: 0014832 View Revisions
2011-05-12 17:53 frl File Added: testimportres.xml
2011-05-12 17:53 frl File Added: testresultimport.jpg
2011-05-12 18:26 frl Note Added: 0014850
2011-05-12 19:19 fman Status assigned => acknowledged
2011-05-12 19:23 fman Note Added: 0014854
2011-05-12 19:23 fman Status acknowledged => resolved
2011-05-12 19:23 fman Fixed in Version => 1.9.3 (2011 Q3 - bug fixing)
2011-05-12 19:23 fman Resolution open => fixed
2011-05-12 19:24 fman Relationship added child of 0004337
2011-05-12 19:26 fman Note Edited: 0014854 View Revisions
2011-07-02 13:49 fman Note Added: 0015451
2011-07-02 13:49 fman Status resolved => closed
2012-09-20 21:40 fman Task Workflow Status => TBD
2012-09-20 21:40 fman Category Export/Import => Import results XML format



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker