Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.0.2
-
Fix Version/s: 3.4.6
-
Component/s: Core CiviCRM
-
Labels:None
Description
I raised this issue on the forums, http://forum.civicrm.org/index.php?topic=20260 , and Dave Greenberg helped sort out the details. The submitted patch shows the creator of the activity as well as to who the activity affects.
It was necessary to modify civicrm/CRM/Contact/BAO/Contact/Utils.php and civicrm/CRM/Activity/Form/Task/Batch.php.
In Utils the following lines were modified:
Line 691, 711-714, 746
In Batch.php
Line 81
This works properly on Drupal 7 Civi 4.0.2.
The final query that runs looks like this.
SELECT contact_source.id as contactId, civicrm_activity.id as componentId, contact_source.sort_name as source_sort_name, contact_target.sort_name as target_sort_name
FROM civicrm_activity as civicrm_activity
INNER JOIN civicrm_contact as contact_source ON ( contact_source.id = civicrm_activity.source_contact_id )
LEFT JOIN civicrm_activity_target ON (civicrm_activity_target.activity_id = civicrm_activity.id)
LEFT JOIN civicrm_contact as contact_target ON ( contact_target.id = civicrm_activity_target.target_contact_id )
WHERE $whereClause
Group By componentId";
The improvement is subpar because it utilizes fixed table names, not the property versions found in the original.