Skip to content

Commit

Permalink
Merge pull request #25169 from demeritcowboy/act-targ-value
Browse files Browse the repository at this point in the history
E_NOTICES on activity view
  • Loading branch information
yashodha authored Dec 14, 2022
2 parents 595beb4 + 9b1d661 commit a8de2f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CRM/Activity/Form/ActivityView.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ public function preProcess() {
}
}

// ensure these are set so that they get assigned to the template
$values['mailingId'] = $values['mailingId'] ?? NULL;
$values['campaign'] = $values['campaign'] ?? NULL;
$values['engagement_level'] = $values['engagement_level'] ?? NULL;

// Get the campaign.
if ($campaignId = CRM_Utils_Array::value('campaign_id', $defaults)) {
$campaigns = CRM_Campaign_BAO_Campaign::getCampaigns($campaignId);
Expand Down
3 changes: 3 additions & 0 deletions tests/phpunit/CRM/Activity/Form/ActivityViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ public function testActivityViewPreProcess(): void {
'modified_date' => $activityMoreInfo['modified_date'],
'activity_modified_date' => $activityMoreInfo['modified_date'],
'attachment' => NULL,
'mailingId' => NULL,
'campaign' => NULL,
'engagement_level' => NULL,
];

$this->assertEquals($expected, $templateVar);
Expand Down

0 comments on commit a8de2f4

Please sign in to comment.