How to prevent data loss when changing custom field types
Question ID: 106689
0
0

I need help. We've been using a custom field for quite some time that was created as type Number, and we recently changed the type to String, but now we want it changed back to Number. The problem is, when I try to change it, it warns me that it will delete everything in that field for all defects. I have a lot of defects that will be affected if I lose the data from these fields. How can I change the field type back to Number without losing the data?

Marked as spam
Posted by (Questions: 239, Answers: 31)
Asked on February 5, 2016 9:54 pm
61 views
Answers (1)
0
Private answer

Unfortunately there is no way to change the field type without losing the data in ALM. I do have another method that you may want to consider using in order to change the custom field type back to Number and to keep all of the data. It involves moving the data within the project database, but first, you will need to make sure that if any string values were entered and saved while the custom field type was String, you will need to remove those values to prevent mismatch data. Mismatch data will likely cause future problems within the project database. I have listed the steps below on how to perform this procedure in the database if you have the proper permissions to do so.

- Create 'New Field' within Project Entities in Project Customization - Save changes
- Access the BUG table in the Project Database within Site Admin
- Use SQL to Copy the data over from the 'Old Field' column to the 'New Field' column
- Use SQL to Delete the data from the 'Old Field' column
- Access 'Project Entities' and change the field type for the 'Old Field' back to 'Number' - Save changes
- Access the BUG table in the Project Database within Site Admin
- Use SQL to Copy the data over from the 'New Field' column to the 'Old Field' column
- Use SQL to Delete the data from the 'New Field' column
- Access 'Project Entities' and delete the 'New Field' - Save changes
- Test the 'Old Field' in the defects module to make sure it accepts numeric values

Marked as spam
Posted by (Questions: 2, Answers: 300)
Answered on February 5, 2016 9:59 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top