From 75ae745c394fcc771e614f8984efb3d6e0c47894 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 14 Sep 2020 09:30:05 +1200 Subject: [PATCH] Pass in activity type rather than calculate it This line is hit in CRM_Event_BAO_ParticipantTest.testCreate api_v3_ContributionTest.testCompleteTransactionWithParticipantRecord I think we should be moving the logic back to the calling functions in general - to the point of them just callling the v4 api directly, but this just clarifies on tiny bit --- CRM/Event/BAO/Participant.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Event/BAO/Participant.php b/CRM/Event/BAO/Participant.php index f18198b209..c68f021c9a 100644 --- a/CRM/Event/BAO/Participant.php +++ b/CRM/Event/BAO/Participant.php @@ -191,7 +191,7 @@ class CRM_Event_BAO_Participant extends CRM_Event_DAO_Participant { ) { // Default status if not specified $participant->status_id = $participant->status_id ?: self::fields()['participant_status_id']['default']; - CRM_Activity_BAO_Activity::addActivity($participant); + CRM_Activity_BAO_Activity::addActivity($participant, 'Event Registration'); } //CRM-5403 -- 2.25.1