----------------------------------------
* CRM-18290: Edits to activities are not saved in CiviCase
https://issues.civicrm.org/jira/browse/CRM-18290
if ($this->_activityId) {
// retrieve and include the custom data of old Activity
$oldActivity = civicrm_api3('Activity', 'getsingle', array('id' => $this->_activityId));
- $params = array_merge($params, $oldActivity);
+ $params = array_merge($oldActivity, $params);
// unset custom fields-id from params since we want custom
// fields to be saved for new activity.