One scenario we might come across when writing certain custom field types is to manipulate the way we display the change log. For a normal Version Picker
custom field, the change log is displayed as follows:
Here, Test Version is the field name. The first value you see, Test1 [10000]
, is the old value, and the second value, Test2 [10001]
, is the new value.
As you saw in the preceding screen, the change log value for both the old value and the new value are displayed in the following format:
change log string [change log id]
Both the string value and ID value are stored in the ChangeItem
table. But before storing the value in the database, this value is generated from the individual custom fields. That is where we need to intercept to manipulate the way the change log is written.
There are two methods, one for changelog string
and another for changelog id
...