Page 1 of 1

Can't import custom fields in 1.8RC5

PostPosted: Fri Mar 20, 2009 12:00 pm
by mt85
Hi,

I tried TestLink 1.8 RC5, but when I wanted to import test cases which has custom fields (the custom field made, and assigned to the project), I got the error message:
"
Import TestCase data : <test case name> : ok
Import TestCase data : <test case name> : Value of Custom Field <custom field name> can not be imported because there is no Custom Field with this name and Available for Test Case on this Test Project
"

I tried to use the syntax in the "tl-file-formats.pdf" file, but it didn't work.

I created a test case with custom field, and export it. But when I try to import the exported file, I got the same message.

It worked fine in 1.8 RC3. Can somebody tell me, what's the problem?

Thanks a lot!

PostPosted: Fri Mar 20, 2009 4:09 pm
by Merch
You have to first create the custom field (use the same name you used with your previous TL install) then do your import.

PostPosted: Mon Mar 23, 2009 1:12 pm
by mt85
Merch wrote:You have to first create the custom field (use the same name you used with your previous TL install) then do your import.


Thanx for your answer, but I created the custom field, and it didn't work :(

My steps:
1. create a project (project_example)

2. define a custom field (name: 'note', label: 'try to add notes here', type: string, available for: test case, any other set yes)

3. assign custom field 'note' to 'project_example'

4. edit test cases -> new child test suite -> created a test_suite_example without any keywords

5. update tree, and click on the test suite

6. clicked on import test cases button

7. I created a custom.xml like this:

<?xml version="1.0" encoding="UTF-8"?>
<testcases>
<testcase name="MyOwn">
<summary></summary>
<steps></steps>
<expectedresults></expectedresults>
<custom_fields>
<custom_field>
<name><![CDATA[note]]></name>
<value><![CDATA[my first own note]]></value>
</custom_field>
</custom_fields>
</testcase>
</testcases>

(I tried to clear CDATA tags, tried to set summary, steps, expectedresults field, and tried the "tl-file-formats.pdf" file's Example-XML-with custom fields file with my own custom field -> it didn't work too)

8. When I tried to upload custom.xml file in "Import test cases" menu, I got the following error message:
Import TestCase data : MyOwn : OK
Import TestCase data : MyOwn : Value of Custom Field 'note' can not be imported because there is no Custom Field with this name and Available for Test Case on this Test Project

As I said, it worked in RC3 well. Thanks for any help.

Importing custom fields to Test cases

PostPosted: Wed Mar 25, 2009 5:14 am
by ssinha
Hi TestLink Team,

I am facing same issue for importing custom fields in 1.8RC5

Re: Importing custom fields to Test cases

PostPosted: Thu Apr 02, 2009 9:40 am
by mt85
ssinha wrote:Hi TestLink Team,

I am facing same issue for importing custom fields in 1.8RC5


I tried with 1.8.0 too, but I got the same problem. And you?

Same problem, now worked around

PostPosted: Wed Apr 22, 2009 2:00 pm
by Malte
Had the same problem in 1.8RC5 until I used the database Id for the custom field instead of the name...

That is, in the row

<name><![CDATA[note]]></name>

instead of "note", insert the value of the field "id" from table custom_fields.

(I noticed that the help file regarding this was incorrect, which tricked me too for a while...)

Hope this helps.
/Malte

Re: Same problem, now worked around

PostPosted: Mon Apr 27, 2009 12:58 pm
by mt85
Malte wrote:Had the same problem in 1.8RC5 until I used the database Id for the custom field instead of the name...

That is, in the row

<name><![CDATA[note]]></name>

instead of "note", insert the value of the field "id" from table custom_fields.

(I noticed that the help file regarding this was incorrect, which tricked me too for a while...)

Hope this helps.
/Malte


Thanks for your help, it works for me in 1.8.0!

PostPosted: Mon Apr 27, 2009 1:46 pm
by mt85
But in 1.8.1 it works with the name of the custom field :)

Re: Can't import custom fields in 1.8RC5

PostPosted: Tue Jul 05, 2011 5:56 pm
by krazywar
I am having that same issue now in 1.9.1. Was there any fix to it?

Re: Can't import custom fields in 1.8RC5

PostPosted: Tue Jul 05, 2011 6:27 pm
by fman
why to ask for help on 1.9 on 1.8 forum ?
upgrade to 1.9.3