Skip to content

Commit

Permalink
Merge pull request #13755 from eileenmcnaughton/event_fix
Browse files Browse the repository at this point in the history
dev/core#766 fix loss of custom fields when creating an event from template
  • Loading branch information
seamuslee001 authored Mar 4, 2019
2 parents 26dfced + f213a79 commit 4d19cca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CRM/Core/DAO.php
Original file line number Diff line number Diff line change
Expand Up @@ -1669,6 +1669,9 @@ public static function &copyGeneric($daoName, $criteria, $newData = NULL, $field
}
}
$newObject->save();
if (!empty($newData['custom'])) {
CRM_Core_BAO_CustomValueTable::store($newData['custom'], $newObject::getTableName(), $newObject->id);
}
CRM_Utils_Hook::post('create', CRM_Core_DAO_AllCoreTables::getBriefName($daoName), $newObject->id, $newObject);
}

Expand Down

0 comments on commit 4d19cca

Please sign in to comment.