Posted by fen on January 29, 2009 at 4:12am
Jump to:
| Project: | CiviCRM 2.0+ Compatibility |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
The send module calls crm_create_activity_history() which no longer exists in the CiviCRM 2.x API. According to the CiviCRM developers: "a fair number of the api calls were simple wrappers on static methods in our BAO objects ... i'm more inclined to get folks to call the internal API's directly". So the attached patch does just that. It has been tested on my site and works.
| Attachment | Size |
|---|---|
| crm_create_activity_history.patch | 1.22 KB |
Comments
#1
I'll try to review this in mid-June, after I get back from my honeymoon. (I just took over maintainership recently.)
#2
I tried the patch but then (when using the 'petition' module) I get the following error:
Fatal error: Class 'CRM_Core_BAO_History' not found in /vol/home/organizations/abeedoo.com/platforms/drupal-6.16/sites/ilraiseyourhand.org/modules/civicrm20compat/civicrm20compat.module on line 106
#3
@fen: What version of CiviCRM was this patch made for? I did a search in the codebase of CiviCRM 3.1 and was unable to find the CRM_Core_BAO_History class which is referenced in the patch.
I imagine this is what is causing meecect's error in #2.
#4
@fen: Can you contact Donald Lobo on IRC or in the forums to ask him what would be the best way to externally interface with activity history? I think that the internal functions change signature too much to use.
I'm happy to commit a patch, but it would require testing by yourself & at least one other person (to mark RTBC)