Best practice for changing an item type's field

By Carmen posted 09-04-2015 23:52

  
It is possible to change an item type's field that is already in use by using the Roundtrip export

To start, you need to create a new data field. Go to Admin > Item Types > Select the item type > Config > Add Field to create the new field.



Note that the new field should be of a new type. This will allow you to change the field type, by replacement.

You also need to take into consideration the type of data you have when changing the field type. For instance, text content cannot be stored in an Integer as an Integer can store only numbers.



After creating the new field, you need to add it to the List View so it can be exported. You can do this through the Admin > Item Type > Configure View option, by adding the field to the list on the right.



Alternatively, you can use the Configure View option in the List View to do that.



Locate the items you want to change by creating a filter or opening their set in List View. From the List View, open the Export Menu > Office Templates.



Select and Run the Excel Export for Roundtrip.



This will generate an Excel export. Open the export in Excel and copy and paste the data from the old field's column to the new field's column.



You can now save the spreadsheet and import it back into Jama Software. 



Also, don't forget to check the box for round-trip during import.



The items will be updated in that Project, though this needs to be done in every project that uses that particular item type.

If the new field type is compatible with the data imported, you should be able to see identical data in the two field types (otherwise, the new field will be empty).

After you confirm that the data was successfully imported to the new field type, you just need to go to Admin > Item Types > Config again and delete the old field to complete the change.

#administration
5 comments
247 views

Comments

09-20-2016 22:20

Hi Adam! I just merged your question to an existing article—you were right on the money by guessing Round trip.

09-20-2016 22:19

This reply was created from a merged topic originally titled Is there a way to convert a text field item type to a text box item type?.

Someone was adding a new "rationale" field to a requirement item type. Instead of making the field type a text box item, they selected text field. Text field appears to limited to a single line and a small number of characters.

We didn't notice this until the item type had been used to create a large number of items in the database, many of use have information in this new rationale field.

Is there an automated way to change this item type field from a text field to a text box and retain the content? Perhaps an excel round trip or reuse with a field mapping?

07-18-2016 13:56

This is a crafty tip! Thanks.

10-13-2015 22:55

I think you make a good point in regards to folks who might have a lot of custom reports that rely on a unique field name. It would be too easy to miss a field that needs updating if they're being manually fixed. I think you've offered the best suggestion to work around this potential issue.

10-06-2015 14:07

Given that custom reports (e.g. Office, BIRT) typically reference a field by its unique field name, rather than by the field label, am I correct in assuming that any custom reports which referred to the item type's field will need to be updated if following these steps exactly?

i.e. If the original unique field name was "solReqImportance", and the new field was created with unique field name "solReqImportance2", even after copying the data from old field to new and deleting the original "Importance" field (unique field name solReqImportance), you don't have the option to update the unique field name of the new field, so it remains as "solReqImportance2".

Any custom reports pointing to the old field name of "solReqImportance" will need to be updated, since that field no longer exists.

Would it work to do a slight alternative to the above steps?
  1. Export data into Excel Round Trip
  2. Delete the original field
  3. Create a new field of the desired type, with 100% identical "Field Label AND "Unique Field Name" to the original deleted field
  4. Import data from the Excel Round Trip document
I recognize that this is not as safe, since you've deleted the field data from the database and left your only possible backup as the Excel file, but IF it still works, and saves you from having to update multiple custom reports, some customers may consider the added risk worth it.

Thoughts?