Commit fe87e754 authored by unknown's avatar unknown

few notice fixes during webtest for recurring entities

parent 90c10975
......@@ -977,7 +977,9 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
$params['parent_entity_id'] = $params['entity_id'];
$scheduleReminderDetails = CRM_Core_BAO_RecurringEntity::getReminderDetailsByEntityId($params['entity_id'], $params['entity_table']);
}
$params['schedule_reminder_id'] = $scheduleReminderDetails->id;
if (property_exists($scheduleReminderDetails, 'id')) {
$params['schedule_reminder_id'] = $scheduleReminderDetails->id;
}
}
$params['dateColumns'] = array('activity_date_time');
......
......@@ -238,7 +238,7 @@ class CRM_Core_Form_RecurringEntity {
$errors = array();
//Process this function only when you get this variable
if ($values['allowRepeatConfigToSubmit'] == 1) {
$dayOfTheWeek = array(monday,tuesday,wednesday,thursday,friday,saturday,sunday);
$dayOfTheWeek = array('monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday');
//Repeats
if (!CRM_Utils_Array::value('repetition_frequency_unit', $values)) {
$errors['repetition_frequency_unit'] = ts('This is a required field');
......@@ -337,7 +337,8 @@ class CRM_Core_Form_RecurringEntity {
}
//Save post params to the schedule reminder table
$dbParams = CRM_Core_BAO_RecurringEntity::mapFormValuesToDB($params);
$recurobj = new CRM_Core_BAO_RecurringEntity();
$dbParams = $recurobj->mapFormValuesToDB($params);
//Delete repeat configuration and rebuild
if (CRM_Utils_Array::value('id', $params)) {
......@@ -459,7 +460,9 @@ class CRM_Core_Form_RecurringEntity {
$recursion->excludeDates = $excludeDateList;
$recursion->excludeDateRangeColumns = $params['excludeDateRangeColumns'];
}
$recursion->intervalDateColumns = $params['intervalDateColumns'];
if (CRM_Utils_Array::value('intervalDateColumns', $params)) {
$recursion->intervalDateColumns = $params['intervalDateColumns'];
}
$recursion->entity_id = $params['entity_id'];
$recursion->entity_table = $params['entity_table'];
if (!empty($linkedEntities)) {
......
......@@ -105,7 +105,7 @@ class WebTest_Activity_AddRecurringActivityTest extends CiviSeleniumTestCase {
}
$this->type('start_action_offset', $occurrences);
$this->click('_qf_Activity_upload-bottom');
$this->waitForTextPresent('Based on your repeat configuration here is the list of dates, Do you wish to create recurring set of these dates?');
$this->waitForTextPresent('Based on your repeat configuration, here is the list of dates. Do you wish to create a recurring set with these dates?');
$this->click("xpath=//div[@class='ui-dialog-buttonset']/button/span[text()='Ok']");
$this->waitForPageToLoad();
......
......@@ -62,7 +62,7 @@ class WebTest_Event_AddRecurringEventTest extends CiviSeleniumTestCase {
$this->webtestFillDate("exclude_date", "12/05/2015");
$this->click('add_to_exclude_list');
$this->click('_qf_Repeat_submit-bottom');
$this->waitForTextPresent('Based on your repeat configuration here is the list of dates, Do you wish to create recurring set of these dates?');
$this->waitForTextPresent('Based on your repeat configuration, here is the list of dates. Do you wish to create a recurring set with these dates?');
$this->click("xpath=//div[@class='ui-dialog-buttonset']/button/span[text()='Ok']");
$this->waitForAjaxContent();
$this->checkCRMAlert('Repeat Configuration has been saved');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment