CRM_Core_Error::deprecatedFunctionWarning('$params[\'id\'] should be set, $ids is deprecated');
}
$id = $params['id'] ?? $ids['optionValue'] ?? NULL;
- // CRM-10921: do not reset attributes to default if this is an update
- //@todo consider if defaults are being set in the right place. 'dumb' defaults like
- // these would be usefully set @ the api layer so they are visible to api users
- // complex defaults like the domain id below would make sense in the setDefauls function
- // but unclear what other ways this function is being used
- if (!$id) {
- $params['is_active'] = CRM_Utils_Array::value('is_active', $params, FALSE);
- $params['is_default'] = CRM_Utils_Array::value('is_default', $params, FALSE);
- $params['is_optgroup'] = CRM_Utils_Array::value('is_optgroup', $params, FALSE);
- $params['filter'] = CRM_Utils_Array::value('filter', $params, FALSE);
- }
+
// Update custom field data to reflect the new value
- elseif (isset($params['value'])) {
+ if ($id && isset($params['value'])) {
CRM_Core_BAO_CustomOption::updateValue($id, $params['value']);
}
*
* Generated from xml/schema/CRM/Core/OptionValue.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:c58b4d38fe97741293f8bc5ae5b64e98)
+ * (GenCodeChecksum:7aa11987c26800632c3798b4cfce95c1)
*/
/**
'title' => ts('Filter'),
'description' => ts('Bitwise logic can be used to create subsets of options within an option_group for different uses.'),
'where' => 'civicrm_option_value.filter',
+ 'default' => 'NULL',
'table_name' => 'civicrm_option_value',
'entity' => 'OptionValue',
'bao' => 'CRM_Core_BAO_OptionValue',
{* file to handle db changes in 5.26.alpha1 during upgrade *}
+ALTER TABLE civicrm_option_value MODIFY COLUMN `filter` int unsigned DEFAULT NULL COMMENT 'Bitwise logic can be used to create subsets of options within an option_group for different uses.';
+
UPDATE civicrm_contact SET is_deceased = 0 WHERE is_deceased IS NULL;
ALTER TABLE civicrm_contact MODIFY COLUMN is_deceased TINYINT NOT NULL DEFAULT 0;