Can't import custom fields in 1.8RC5

1.8 related questions and discussions.
Please upgrade to LATEST 1.9.x.
No more fixes for 1.8.

Moderators: Amaradana, TurboPT, TL Developers

Locked
mt85
TestLink user
Posts: 5
Joined: Fri Mar 20, 2009 11:44 am

Can't import custom fields in 1.8RC5

Post 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!
Merch
TestLink user
Posts: 8
Joined: Thu Mar 19, 2009 7:26 pm

Post 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.
mt85
TestLink user
Posts: 5
Joined: Fri Mar 20, 2009 11:44 am

Post 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.
ssinha
TestLink user
Posts: 1
Joined: Wed Mar 25, 2009 5:12 am

Importing custom fields to Test cases

Post by ssinha »

Hi TestLink Team,

I am facing same issue for importing custom fields in 1.8RC5
mt85
TestLink user
Posts: 5
Joined: Fri Mar 20, 2009 11:44 am

Re: Importing custom fields to Test cases

Post 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?
Malte
TestLink user
Posts: 12
Joined: Wed Apr 22, 2009 1:48 pm

Same problem, now worked around

Post 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
mt85
TestLink user
Posts: 5
Joined: Fri Mar 20, 2009 11:44 am

Re: Same problem, now worked around

Post 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!
mt85
TestLink user
Posts: 5
Joined: Fri Mar 20, 2009 11:44 am

Post by mt85 »

But in 1.8.1 it works with the name of the custom field :)
krazywar
TestLink user
Posts: 4
Joined: Thu Jun 30, 2011 5:23 pm

Re: Can't import custom fields in 1.8RC5

Post by krazywar »

I am having that same issue now in 1.9.1. Was there any fix to it?
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Can't import custom fields in 1.8RC5

Post by fman »

why to ask for help on 1.9 on 1.8 forum ?
upgrade to 1.9.3
Locked