YouTrack Server
 

Change Field Type

Last modified: 09 October 2024

You can convert an issue field type to another type that stores similar data. The following field type conversions are supported:

  • Fields that store data as a string can be converted to store text or enumerated types with single or multiple values.

  • You can convert text fields to string.

  • Fields that store a date can be converted to store date and time, and vice versa.

  • For fields that store data as an integer, period, or float, you can convert the data to a target format within this set of types. For example, you can convert an integer type to a period type. Here, you have the option to convert the value that is stored as an integer to a number of hours or number of days.

  • You can convert enumerated types that support single value to string or another enumerated type with the single value (enum[1], build[1], ownedField[1], state[1], version[1]).

  • You can convert enumerated types that support multiple values to string or another enumerated type with multiple values (enum[*], build[*], ownedField[*], version[*]).

There are a number of cases where data can be lost. For example, if you have a field that stores an enum type (or any other pseudo-enum like build or version) and convert it to string, the enumerated values are converted into a comma-separated string. If you were to convert the type back to the enumerated type, previous enumerations that are not contained in any of the converted strings are not restored to the set of values in the field. Any color coding assigned to specific values in an enumerated set is lost during conversion. Other secondary properties like release date and archive date (for versions) are also discarded.

If any of the following conditions are present, you are not allowed to change the field type:

  • The field identifies columns on an agile board.

  • The field identifies swimlanes on an agile board.

  • The field is linked to sprints on an agile board.

  • The field is mapped in build server integration settings.

Field type is a global property and cannot be modified on a per-project basis.

If you want to replace an existing custom field with a field that uses a different type, you can't use the Replace operation. Instead, you need to add a custom field that stores values in the desired type to the project and migrate the data manually from the original field.