Skip to content
Snippets Groups Projects
Commit 5c7ed01d authored by Kurund Jalmi's avatar Kurund Jalmi
Browse files

Merge pull request #1775 from pratik-joshi/CRM-13237

fix for CRM-13237 : we are currently not updating contribution activity while editing contributions, thats why the campaign id doesn't get saved in activity record during contribution edits
parents 1552bf3e 7910ff9c
No related branches found
Tags 4.3.5
No related merge requests found
...@@ -292,9 +292,13 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution { ...@@ -292,9 +292,13 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution {
'Contribution', 'Contribution',
'name' 'name'
); );
if (!$activity->find()) { if (!$activity->find(TRUE)) {
CRM_Activity_BAO_Activity::addActivity($contribution, 'Offline'); CRM_Activity_BAO_Activity::addActivity($contribution, 'Offline');
} }
else {
// CRM-13237 : if activity record found, update it with campaign id of contribution
CRM_Core_DAO::setFieldValue('CRM_Activity_BAO_Activity', $activity->id, 'campaign_id', $contribution->campaign_id);
}
// Handle soft credit and / or link to personal campaign page // Handle soft credit and / or link to personal campaign page
list($type, $softIDs) = CRM_Contribute_BAO_ContributionSoft::getSoftCreditType($contribution->id); list($type, $softIDs) = CRM_Contribute_BAO_ContributionSoft::getSoftCreditType($contribution->id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment