*/
public static function getDateFields() {
$allFields = CRM_Core_BAO_CustomField::getFields('');
- $dateFields = array('birth_date' => ts('Birth Date'));
+ $dateFields = array(
+ 'birth_date' => ts('Birth Date'),
+ 'created_date' => ts('Created Date'),
+ 'modified_date' => ts('Modified Date'),
+ );
foreach ($allFields as $fieldID => $field) {
if ($field['data_type'] == 'Date') {
$dateFields["custom_$fieldID"] = $field['label'];
}
if ($mapping->entity == 'civicrm_contact') {
- if ($value == 'birth_date') {
- $dateDBField = 'birth_date';
+ $contactFields = array(
+ 'birth_date',
+ 'created_date',
+ 'modified_date',
+ );
+ if (in_array($value, $contactFields)) {
+ $dateDBField = $value;
$table = 'civicrm_contact e';
$contactField = 'e.id';
$where[] = 'e.is_deleted = 0';
// regular mode:
$dateField = 'e.' . $dateDBField;
}
- // TODO get this working
-
- // TODO: Make sure everything's provided for repetition, etc.
}
// CRM-13577 Introduce Smart Groups Handling