Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005070TestLinkExport/Importpublic2012-06-19 15:532012-09-01 19:59
ReporterEvelin 
Assigned Tofman 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSWindows 2008 Server x86OS Version
Product Version1.9.3 (2011 Q3 - bug fixing) 
Fixed in Version1.9.4 (2012 Q3 - bug fixing) 
Summary0005070: Import Test suite with Custom fields - Custom fields are not imported
DescriptionFor test purposes, I exported an empty test suite (means it has no test cases) that has 2 values in a custom field, renamed the test suite in the xml file and re-imported it. The new suite is created but the custom field values are missing.

To me, this looks like a bug.
Please see attached xml.
Steps To Reproduce- configure a custom field for test suites: Suite_Component(s)
- add some options for this custom field
- create a test suite called "Test" and select 2 components
- export this test suite
- change the name in the xml file to "Test 2" but nothing else
- reimport the suite
--> no components
TagsTO BE FIXED on 2.0
Database (MySQL,Postgres,etc)MySQL
BrowserIE8
PHP Version5.3
TestCaseID
QA Team - Task Workflow Status
Attached Filesxml file icon empty-suite.xml [^] (418 bytes) 2012-06-19 15:53
xml file icon customFields.xml [^] (14,250 bytes) 2012-06-21 14:52
xml file icon truning_2_all_testsuites.xml [^] (2,069 bytes) 2012-06-23 07:46
gz file icon qfix-issues5070-5073-20120623-1105.tar.gz [^] (20,246 bytes) 2012-06-23 09:06

- Relationships
related to 0004925closedfman Import many TestCases in xml does import only first TC - Consider Test Case as duplicate if: has same internal ID 
parent of 0004963closedfman Test case / Test suite XML format, new element to set author 
related to 0005075closedfman Import Test suite with Keywords - All test suites end with same keywords 

-  Notes
(0016915)
fman (administrator)
2012-06-20 16:59

Please provide Custom fields definition (you can provide the XML generated on TL using export)
(0016919)
Evelin (reporter)
2012-06-21 14:53

Custom Fields definition attached.
(0016920)
fman (administrator)
2012-06-21 18:30
edited on: 2012-06-21 18:36

issue seems originated due to error on EXPORT logic + completely missing logic to import Custom fields for test suites

(0016923)
fman (administrator)
2012-06-21 21:37
edited on: 2012-06-21 21:39

here a first fix (surelly some checks are missing)

1. you have to FIX EXPORT FIRST
testsuite.class.php

search function exportTestSuiteDataToXML(

then your code has to become (piece to be changed is in BOLD):
$xmlTC = "<testsuite name=\"" . 
         htmlspecialchars($tsuiteData['name']). '" >' .
     "\n<node_order><![CDATA[{$tsuiteData['node_order']}]]>
         </node_order>\n" .
         "<details><![CDATA[{$tsuiteData['details']}]]></details>\n{$kwXML}{$cfXML}";



(0016924)
fman (administrator)
2012-06-21 21:40

2. you have to replace some existent files with one provided in attached zip.

let me know
(0016927)
Evelin (reporter)
2012-06-22 09:25

OK, I fixed the part you mentioned in testsuite.class.php, but why should I replace it then by the testsuite.class.php which is included in the zip?
By now, I only fixed the function and replaced tcImport.php.

I exported the suite again, and when I import the new-test.xml file (see attachment) I get "Warning: xml_load_ko" and the suite is not imported.
(0016928)
fman (administrator)
2012-06-22 10:00

I will give a look later, and try to provide feedback, may be I've forgot something
(0016932)
fman (administrator)
2012-06-23 07:46

ok, try with new fix, please. ( I will remove old one,and your last xml)
(0016933)
fman (administrator)
2012-06-23 07:49

please try with new fix, have uploaded also an xml to use on test
(0016936)
fman (administrator)
2012-06-23 16:20

testlink 1.9
http://gitorious.org/testlink-ga/testlink-code/commit/d080b4cc0e8585c07d2c94dc164ed6730eb9226d [^]
(0016941)
Evelin (reporter)
2012-06-25 13:09

Sorry, I couldn't comment the issue unless I clicked Reopen (Mantis - The Mystery).
I replaced the files from the last fix - and yes, it works (with the Alan Turing example as well as with my own test suite).
Thanks, fman.
(0017335)
fman (administrator)
2012-09-01 19:59

1.9.4 released

- Issue History
Date Modified Username Field Change
2012-06-19 15:53 Evelin New Issue
2012-06-19 15:53 Evelin File Added: empty-suite.xml
2012-06-20 16:59 fman Note Added: 0016915
2012-06-21 14:52 Evelin File Added: customFields.xml
2012-06-21 14:53 Evelin Note Added: 0016919
2012-06-21 17:47 fman Assigned To => fman
2012-06-21 17:47 fman Status new => acknowledged
2012-06-21 18:30 fman Note Added: 0016920
2012-06-21 18:36 fman Note Edited: 0016920 View Revisions
2012-06-21 18:36 fman Summary Custom field not imported => Import Test suite with Custom fields - Custom fields are not imported
2012-06-21 21:37 fman Note Added: 0016923
2012-06-21 21:38 fman Note Edited: 0016923 View Revisions
2012-06-21 21:39 fman Note Edited: 0016923 View Revisions
2012-06-21 21:40 fman Note Added: 0016924
2012-06-21 21:43 fman File Added: quick-fix-5070.tar.gz
2012-06-22 09:25 Evelin Note Added: 0016927
2012-06-22 09:26 Evelin File Added: new-test.xml
2012-06-22 10:00 fman Note Added: 0016928
2012-06-23 07:46 fman Note Added: 0016932
2012-06-23 07:46 fman File Deleted: new-test.xml
2012-06-23 07:46 fman File Deleted: quick-fix-5070.tar.gz
2012-06-23 07:46 fman File Added: truning_2_all_testsuites.xml
2012-06-23 07:49 fman File Added: quickfix2-issue-5070-20120623.tar.gz
2012-06-23 07:49 fman Note Added: 0016933
2012-06-23 07:49 fman Status acknowledged => feedback
2012-06-23 07:54 fman Relationship added related to 0004925
2012-06-23 07:54 fman Relationship added parent of 0004963
2012-06-23 08:38 fman File Deleted: quickfix2-issue-5070-20120623.tar.gz
2012-06-23 09:00 fman Relationship added related to 0005075
2012-06-23 09:06 fman File Added: qfix-issues5070-5073-20120623-1105.tar.gz
2012-06-23 16:20 fman Note Added: 0016936
2012-06-23 16:20 fman Tag Attached: TO BE FIXED on 2.0
2012-06-23 17:27 fman Status feedback => resolved
2012-06-23 17:27 fman Fixed in Version => 1.9.4 (2012 Q3 - bug fixing)
2012-06-23 17:27 fman Resolution open => fixed
2012-06-25 13:09 Evelin Note Added: 0016941
2012-06-25 13:09 Evelin Status resolved => assigned
2012-06-25 13:09 Evelin Resolution fixed => reopened
2012-07-02 18:24 fman Status assigned => resolved
2012-07-02 18:24 fman Resolution reopened => fixed
2012-09-01 19:59 fman Note Added: 0017335
2012-09-01 19:59 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker