From 10c7ceab340cfa6c0168cee7068da63ceb97168b Mon Sep 17 00:00:00 2001 From: atif-shaikh Date: Wed, 24 Dec 2014 17:25:59 +0530 Subject: [PATCH] CRM-15754 - Custom participant statuses print their ID in event confirmation email https://issues.civicrm.org/jira/browse/CRM-15754 --- CRM/Event/BAO/Event.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CRM/Event/BAO/Event.php b/CRM/Event/BAO/Event.php index 95c2a8964c..3a0937a2e4 100644 --- a/CRM/Event/BAO/Event.php +++ b/CRM/Event/BAO/Event.php @@ -1146,10 +1146,14 @@ WHERE civicrm_event.is_active = 1 // CRM-13890 : NOTE wait list condition need to be given so that // wait list message is shown properly in email i.e. WRT online event registration template - if (empty($values['params']['isOnWaitlist'])) { + if (empty($tplParams['participant_status']) && empty($values['params']['isOnWaitlist'])) { $statusId = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Participant', $participantId, 'status_id', 'id'); $tplParams['participant_status'] = CRM_Event_PseudoConstant::participantStatus($statusId, NULL, 'label'); } + //CRM-15754 - if participant_status contains status ID + elseif (CRM_Utils_Rule::integer($tplParams['participant_status'])) { + $tplParams['participant_status'] = CRM_Event_PseudoConstant::participantStatus($tplParams['participant_status'], NULL, 'label'); + } $sendTemplateParams = array( 'groupName' => 'msg_tpl_workflow_event', -- 2.25.1