From 9ed2ee0701f17c9d68968ef5156cf0fb4b967643 Mon Sep 17 00:00:00 2001 From: Yashodha Chaku Date: Wed, 24 Apr 2019 20:57:19 +0530 Subject: [PATCH] Revert "dev/core#553: Creating new event takes value from default value not from saved template for custom fields" --- CRM/Event/Form/ManageEvent/EventInfo.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Event/Form/ManageEvent/EventInfo.php b/CRM/Event/Form/ManageEvent/EventInfo.php index 2176bab216..31317c09aa 100644 --- a/CRM/Event/Form/ManageEvent/EventInfo.php +++ b/CRM/Event/Form/ManageEvent/EventInfo.php @@ -48,11 +48,10 @@ class CRM_Event_Form_ManageEvent_EventInfo extends CRM_Event_Form_ManageEvent { parent::preProcess(); $this->assign('selectedChild', 'settings'); - $entityID = $this->_id ?: $this->_templateId; - if ($entityID) { - $this->assign('entityID', $entityID); + if ($this->_id) { + $this->assign('entityID', $this->_id); $eventType = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', - $entityID, + $this->_id, 'event_type_id' ); } @@ -128,6 +127,7 @@ class CRM_Event_Form_ManageEvent_EventInfo extends CRM_Event_Form_ManageEvent { if ($this->_eventType) { $this->assign('customDataSubType', $this->_eventType); } + $this->assign('entityId', $this->_id); $this->_first = TRUE; $this->applyFilter('__ALL__', 'trim'); -- 2.25.1