Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003868TestLinkExport/Importpublic2010-10-07 13:362010-10-09 08:00
Reportersybren 
Assigned Tofman 
PrioritynormalSeverityblockReproducibilityalways
StatusclosedResolutionfixed 
PlatformKubuntu Linux 10.04OSLinux 2.6OS Version2.6.32
Product Version 
Fixed in Version1.9 RC 1 
Summary0003868: Importing exported XML results - custom fields have unexpected NEW LINES
DescriptionI have exported my test suites to XML, and then imported that XML again.

Expected result: the custom fields remains the same.

Observed result: the custom fields changed.

More specific: whitespace is added making queries like "select * from cfield_design_values where value='CMRC-TESTID-123';" fail after importing the data. This is blocking for our intended use of TestLink.
Steps To Reproduce 1. get code fresh from CVS, make sure your database is clean.
 2. create a test project
 3. import customFields.xml
 4. assign the custom field "checkmate_id"
 5. go to Test Specification

 6. click on the test project
 7. import all_testsuites_proper_checkmate_id.xml
 8. in a DB client: select * from cfield_design_values;
 9. Note that the values are either empty or set to a string without
    any whitespace (space or newline).
10. in a DB client: select * from cfield_design_values where value='CMRC-TESTID-123';
11. Note that one row is returned.

12. click on the test project
13. export all test suites to all_testsuites_exported.xml, make sure
    that the "Export Custom Fields" checkbox is checked.
14. Inspect the XML, note that there are newlines added to the custom
    field value.

15. Import all_testsuites_exported.xml, select "Update data on latest
    version" as action for duplicates.
16. in a DB client: select * from cfield_design_values;
17. Note that the added whitespace is now also in the database.
18. in a DB client: select * from cfield_design_values where value='CMRC-TESTID-123';
19. Note that no rows are returned.

TagsNo tags attached.
Database (MySQL,Postgres,etc)PostgreSQL 8.4
BrowserFirefox 3.6
PHP Version5.3.1
TestCaseID
QA Team - Task Workflow Status
Attached Fileszip file icon example_xml_files.zip [^] (1,431 bytes) 2010-10-08 11:14

- Relationships

-  Notes
(0011670)
fman (administrator)
2010-10-07 17:02

1. please attach the xml files you mention
2. please do not report more issues on CVS code, we will work only on official released versions. Thanks for your understanding
(0011676)
sybren (reporter)
2010-10-08 11:22

1. oops, sorry for the missing file.

2. It's a waste of my time and yours, when I report a bug that you've already fixed in CVS.

On the forum you wrote: "We need help to test Test Link before releasing, then we are looking for people willing to get LAST CVS CODE and test it."

It's on http://www.teamst.org/forum/viewtopic.php?f=11&t=3499 [^]

So make up your mind about what you want!

1.9-rc1 is not even in the "product version" list of Mantis, so even if I wanted to I couldn't properly submit an issue.

And if all of the above isn't enough, I'm also developing on TestLink by adding new features (matching on custom fields when importing results and test cases). I want my patches to work with the latest version in CVS so that you can apply them as easily as possible.
(0011684)
fman (administrator)
2010-10-08 16:55

>> FROM on http://www.teamst.org/forum/viewtopic.php?f=11&t=3499 [^] [^]
>>Hi:
>>
>>We need help to test Test Link before releasing, then we are looking for people >>willing to get LAST CVS CODE and test it.
>>we will mention all volunteer testers on release news
>>
>>You you are interested to help us, then add a reply to this post, and we will >>contact you to give instructions.

Focus is clear explained => we do not want all people use CVS code (that can have some night commit with some bug) start reporting issues in CVS code.

Obviusly that for contributed code we prefer people use CVS code.
(0011688)
fman (administrator)
2010-10-09 07:58

Quick fix:
open testcase.class.php
search <custom_fields>
You will get:

            if( !is_null($cfMap) && count($cfMap) > 0 )
            {
                $cfRootElem = "<custom_fields>{{XMLCODE}}</custom_fields>";
                $cfElemTemplate = "\t" . "<custom_field>\n" .
                                         "\t<name><![CDATA[||NAME||]]></name>\n" 
.
                                         "\t<value><![CDATA[||VALUE||\n]]></value>\n</custom_field>\n";
                
$cfDecode = array ("||NAME||" => "name","||VALUE||" => "value");
                
$tc_data[0]['xmlcustomfields'] = exportDataToXML($cfMap,$cfRootElem,$cfElemTemplate,$cfDecode,true);
            
} 


remove BOLD text

"\t<value><![CDATA[||VALUE||\n]]></value>\n</custom_field>\n";
(0011689)
fman (administrator)
2010-10-09 08:00

Release 1.9 RC1

- Issue History
Date Modified Username Field Change
2010-10-07 13:36 sybren New Issue
2010-10-07 17:02 fman Note Added: 0011670
2010-10-08 11:14 sybren File Added: example_xml_files.zip
2010-10-08 11:22 sybren Note Added: 0011676
2010-10-08 16:55 fman Note Added: 0011684
2010-10-09 07:51 fman Summary Importing exported XML results in different custom fields => Importing exported XML results - custom fields have unexpected NEW LINES
2010-10-09 07:58 fman Note Added: 0011688
2010-10-09 07:58 fman Status new => resolved
2010-10-09 07:58 fman Fixed in Version => 1.9 RC 1
2010-10-09 07:58 fman Resolution open => fixed
2010-10-09 07:58 fman Assigned To => fman
2010-10-09 08:00 fman Note Added: 0011689
2010-10-09 08:00 fman Status resolved => closed



Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker