From 83fd174a97194f6bc0d1c31ae8abc90131694950 Mon Sep 17 00:00:00 2001 From: Monish Deb Date: Tue, 16 Apr 2019 17:06:55 +0530 Subject: [PATCH] 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 31317c09aa..2176bab216 100644 --- a/CRM/Event/Form/ManageEvent/EventInfo.php +++ b/CRM/Event/Form/ManageEvent/EventInfo.php @@ -48,10 +48,11 @@ class CRM_Event_Form_ManageEvent_EventInfo extends CRM_Event_Form_ManageEvent { parent::preProcess(); $this->assign('selectedChild', 'settings'); - if ($this->_id) { - $this->assign('entityID', $this->_id); + $entityID = $this->_id ?: $this->_templateId; + if ($entityID) { + $this->assign('entityID', $entityID); $eventType = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', - $this->_id, + $entityID, 'event_type_id' ); } @@ -127,7 +128,6 @@ 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