Test Case ID changed after migrating from 1.7.4 to 1.8

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
greaze
Advanced user
Posts: 25
Joined: Mon Dec 08, 2008 4:03 pm

Test Case ID changed after migrating from 1.7.4 to 1.8

Post by greaze »

Hi, Please help me on this one.

we use 1.7.4. Recently we upgraded to 1.8 and found that all the test case IDs have been changed.

For Example, in 1.7.4, one of my test cases has ID 20885.
The same test cases on 1.8 has ID changed to Logon (ID=20)-2057

How can I revert this back to the same IDs that we had on 1.7.4?

Thanks in advance.
greaze
Advanced user
Posts: 25
Joined: Mon Dec 08, 2008 4:03 pm

Post by greaze »

More details:

I have queried the both the databases using:
SELECT * FROM nodes_hierarchy where id = 22577;

The data in the table in both the databases is identical. So the database has not changed I think, its only the way its displayed in 1.8

Please suggest what I need to change to ensure that the test cases id remains the same after migrating to 1.8 from 1.7.4
tlinkjira
TestLink user
Posts: 9
Joined: Thu Jan 29, 2009 12:02 am

Post by tlinkjira »

Did you ever hear back about your question? I'm having the same problem. I can live with new test case ID but really want to get rid of ID=109 or what ever the number is showing up?
For example, 8.1.7 (ID=109)-37:Verify that you can arrange the Sent Items box in any order.
I want to get rid of (ID=109) part. Do you know how?
greaze
Advanced user
Posts: 25
Joined: Mon Dec 08, 2008 4:03 pm

Post by greaze »

Further info:

The prefixed value for the test case id is coming from 'prefix' column in testprojects table. First five characters are your project name truncated and then the ID of the project within columns.

I will read the docs to find a solution but any help in the meantime is appreciated.
greaze
Advanced user
Posts: 25
Joined: Mon Dec 08, 2008 4:03 pm

Post by greaze »

I now understand that this is a feature in 1.8.
Section 3.2 of the user guide.

I do not wish to use this feature. How can I revert the test case IDs back to what they were on 1.7.4?
davila
Advanced user
Posts: 28
Joined: Tue May 16, 2006 3:11 pm

Post by davila »

Upgraded from 1.7.4 to 1.8.0.

We have the same issue. The old IDs are in the DB; how can we display them again? All our TC's have an ID of "0". We are in need of the original TC IDs. Thx.
davila
Advanced user
Posts: 28
Joined: Tue May 16, 2006 3:11 pm

Post by davila »

Found this in the forum and it worked great:

mysql> UPDATE tcversions a SET a.tc_external_id = (SELECT b.parent_id from nodes_hierarchy b where a.id = b.id);
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

Dev Team have added an script that you can found on your installation under third_party\user_con* that will do some magic on Tc id
greaze
Advanced user
Posts: 25
Joined: Mon Dec 08, 2008 4:03 pm

Post by greaze »

we get the following error messages when we run the script.

Any suggestions?


[root@doccontrol ~]# ./reassign_tc_id.php
./reassign_tc_id.php: line 1: ?php: No such file or directory
./reassign_tc_id.php: line 2: /backups: is a directory
./reassign_tc_id.php: line 3: 1.8.0: command not found
./reassign_tc_id.php: line 4: 1.8.0: command not found
./reassign_tc_id.php: line 5: 1.8.0: command not found
./reassign_tc_id.php: line 6: 1.8.0: command not found
./reassign_tc_id.php: line 7: 1.8.0: command not found
./reassign_tc_id.php: line 8: 1.8.0: command not found
./reassign_tc_id.php: line 9: 1.8.0: command not found
./reassign_tc_id.php: line 10: 1.8.0: command not found
./reassign_tc_id.php: line 11: 1.8.0/: is a directory
./reassign_tc_id.php: line 13: syntax error near unexpected token `"../../config.inc.php"'
./reassign_tc_id.php: line 13: `require_once("../../config.inc.php");'
havlatm
Member of TestLink Community
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech

Post by havlatm »

Use:

Code: Select all

# php reassign_tc_id.php
havlatm
Member of TestLink Community
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech

Post by havlatm »

Use:

Code: Select all

# php reassign_tc_id.php
greaze
Advanced user
Posts: 25
Joined: Mon Dec 08, 2008 4:03 pm

Post by greaze »

Logged in as Admin and ran the script from the application.

Works beautifully :D

Well done.
Locked