In connection with changes in T11114, Differential custom fields which appear on commit messages have changed. This change affects you if:
- you run custom third-party code which defines new Differential Custom Fields; and
- those fields appear in commit messages (for example, with arc diff).
This change is part of a broader set of changes related to T11114 and T12010.
Broadly, the commit message handling parts of custom fields have been separated into a new class (DifferentialCommitMessageField). If you have a subclass of DifferentialCustomField which implements commit message methods, make these changes:
- Create a new, corresponding subclass of DifferentialCommitMessageField for your custom field (for example, if you have DifferentialZebraCustomField, create a new DifferentialZebraCommitMessageField).
- If you use Phabricator's custom field storage, extend DifferentialCommitMessageCustomField instead of extending DifferentialCommitMessageField directly.
- Move these methods from the CustomField to the CommitMessageField:
| Old Method | Action | New Method | Notes | 
|---|---|---|---|
| getFieldName() | Copy To | getFieldName() | Both classes should define this method. | 
| getFieldKeyForConduit() | Move To | FIELDKEY class constant | Preserves API compatibility. | 
| shouldAppearInCommitMessage() | Remove | - | Obsolete. | 
| shouldAllowEditInCommitMessage() | Move To | isFieldEditable() | Omit if it always returns true. | 
| getCommitMessageLabels() | Move To | getFieldAliases() | Move and rename method. | 
| parseValueFromCommitMessage() | Move To | parseFieldValue() | Move and rename method. | 
| getRequiredHandlePHIDsForCommitMessage() | Remove | - | Obsolete. | 
| renderCommitMessageValue() | Move To | renderFieldValue() | Move and rename method. Signature has changed. | 
| - | Create? | readFieldValueFromObject() | Optional, but probably desired. | 
| - | Create? | getFieldOrder() | Optional. | 
| - | Create? | isFieldEnabled() | Optional. | 
| validateCommitMessageValue() | Move | validateFieldValue() | Move and rename. | 
| shouldAppearInCommitMessageTemplate() | Move | isTemplateField() | Move and rename. | 
In the upstream, these are the underlying changes, which included making these changes to all upstream CustomFields:


