From: Andrew Hunt Date: Thu, 12 Mar 2015 16:46:22 +0000 (-0400) Subject: add reminders for created_date and modified_date X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8fd66db78b034a4e06e654a9404d97c32a2d9630;p=civicrm-core.git add reminders for created_date and modified_date --- diff --git a/CRM/Core/BAO/ActionSchedule.php b/CRM/Core/BAO/ActionSchedule.php index aa30ae5024..a194c0ecdc 100755 --- a/CRM/Core/BAO/ActionSchedule.php +++ b/CRM/Core/BAO/ActionSchedule.php @@ -73,7 +73,11 @@ class CRM_Core_BAO_ActionSchedule extends CRM_Core_DAO_ActionSchedule { */ 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']; @@ -1108,8 +1112,13 @@ WHERE reminder.action_schedule_id = %1 AND reminder.action_date_time IS NULL } 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'; @@ -1138,9 +1147,6 @@ WHERE reminder.action_schedule_id = %1 AND reminder.action_date_time IS NULL // regular mode: $dateField = 'e.' . $dateDBField; } - // TODO get this working - - // TODO: Make sure everything's provided for repetition, etc. } // CRM-13577 Introduce Smart Groups Handling