From 1d9e2fcbcb1072e9673aa26e777e2bcce64535e6 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Thu, 28 May 2015 17:15:20 +0530 Subject: [PATCH] CRM-16568 - Repeating Events: excluding dates doesn't stop the event from being created --- CRM/Event/Form/ManageEvent/Repeat.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Event/Form/ManageEvent/Repeat.php b/CRM/Event/Form/ManageEvent/Repeat.php index 02c79fbcdf..f031f006e0 100644 --- a/CRM/Event/Form/ManageEvent/Repeat.php +++ b/CRM/Event/Form/ManageEvent/Repeat.php @@ -102,6 +102,10 @@ class CRM_Event_Form_ManageEvent_Repeat extends CRM_Event_Form_ManageEvent { $params['excludeDateRangeColumns'] = array('start_date', 'end_date'); $params['entity_table'] = 'civicrm_event'; $params['entity_id'] = $this->_id; + + // CRM-16568 - check if parent exist for the event. + $parentId = CRM_Core_BAO_RecurringEntity::getParentFor($this->_id, 'civicrm_event'); + $params['parent_entity_id'] = !empty($parentId) ? $parentId : $params['entity_id']; //Unset event id unset($params['id']); -- 2.25.1