CRM-15754 - Custom participant statuses print their ID in event confirmation email
authoratif-shaikh <shaikh388@gmail.com>
Wed, 24 Dec 2014 11:55:59 +0000 (17:25 +0530)
committeratif-shaikh <shaikh388@gmail.com>
Wed, 24 Dec 2014 11:55:59 +0000 (17:25 +0530)
https://issues.civicrm.org/jira/browse/CRM-15754

CRM/Event/BAO/Event.php

index 95c2a8964cdd866381dd241762ae4cf188c2318e..3a0937a2e4dfe825d521f864fcffb2851e04c469 100644 (file)
@@ -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',