Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Won't Fix
-
Affects Version/s: 3.2.3
-
Fix Version/s: 3.3.alpha
-
Component/s: CiviCase, CiviCRM API
-
Labels:None
Description
As the co-author of this API, I'm aware that it still has a few shortcomings. One of the most glaring is the inability to handle "special" case activities such as "Change Case Status" or "Reassign Case." It can add them, but it doesn't do the "special thing" with them. I believe the desired functionality would be to simply pass the proper params to the existing API function civicrm_case_activity_create like so:
$params = array(
'case_id' => 123,
'activity_type_id' => 16 //change case status
'case_status_id' => 3, //extra param for change case status
'source_contact_id' => 1,
'status_id' => 2,
'medium_id' => 1,
);
civicrm_case_activity_create( $params );
And the civicrm_case_activity_create would take it from there, creating the requested activity, and changing the case X (in this example, the status) to boot.
I'm asking for your help because I don't really understand how these work. Where is the data stored? There are no fields for case_status, etc in the civicrm_activity table, so I'm not sure where this "special" case-X activity data lives. What BAO/DAO methods handle this, and where are they in the civicrm code?
Thanks.