Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. --- CRM/Report/Form/Activity.php.orig
  2. +++ CRM/Report/Form/Activity.php
  3. @@ -222,6 +222,16 @@
  4. ),
  5. ),
  6. ),
  7. + 'civicrm_case_activity' => array(
  8. + 'dao' => 'CRM_Case_DAO_CaseActivity',
  9. + 'fields' => array(
  10. + 'case_id' => array(
  11. + 'name' => 'case_id',
  12. + 'title' => ts('Case ID'),
  13. + 'type' => CRM_Utils_Type::T_INT,
  14. + ),
  15. + ),
  16. + ),
  17. 'civicrm_activity' => array(
  18. 'dao' => 'CRM_Activity_DAO_Activity',
  19. 'fields' => array(
  20. @@ -524,6 +534,8 @@
  21. {$this->_aliases['civicrm_activity_contact']}.record_type_id = {$targetID}
  22. INNER JOIN civicrm_contact civicrm_contact_target
  23. ON {$this->_aliases['civicrm_activity_contact']}.contact_id = civicrm_contact_target.id
  24. + LEFT JOIN civicrm_case_activity {$this->_aliases['civicrm_case_activity']}
  25. + ON {$this->_aliases['civicrm_activity']}.id = {$this->_aliases['civicrm_case_activity']}.activity_id
  26. {$this->_aclFrom}";
  27.  
  28. if ($this->isTableSelected('civicrm_email')) {
  29. @@ -852,6 +864,8 @@
  30. INNER JOIN civicrm_activity_contact {$this->_aliases['civicrm_activity_contact']} ON {$this->_aliases['civicrm_activity_contact']}.activity_id
  31. _aliases['civicrm_activity']}.id
  32. AND {$this->_aliases['civicrm_activity_contact']}.record_type_id = {$sourceID}
  33. LEFT JOIN civicrm_contact contact_civireport ON contact_civireport.id = {$this->_aliases['civicrm_activity_contact']}.contact_id
  34. + LEFT JOIN civicrm_case_activity {$this->_aliases['civicrm_case_activity']}
  35. + ON {$this->_aliases['civicrm_activity']}.id = {$this->_aliases['civicrm_case_activity']}.activity_id
  36. {$this->_where} {$groupByFromSelect} {$this->_having} {$this->_orderBy} {$this->_limit}";
  37.  
  38. CRM_Utils_Hook::alterReportVar('sql', $this, $this);
  39. @@ -1131,6 +1145,8 @@
  40. {$this->_aliases['civicrm_activity_contact']}.record_type_id = {$assigneeID}
  41. INNER JOIN civicrm_contact civicrm_contact_assignee
  42. ON {$this->_aliases['civicrm_activity_contact']}.contact_id = civicrm_contact_assignee.id
  43. + LEFT JOIN civicrm_case_activity {$this->_aliases['civicrm_case_activity']}
  44. + ON {$this->_aliases['civicrm_activity']}.id = {$this->_aliases['civicrm_case_activity']}.activity_id
  45. {$this->_aclFrom}";
  46.  
  47. if ($this->isTableSelected('civicrm_email')) {
  48. @@ -1165,6 +1181,8 @@
  49. {$this->_aliases['civicrm_activity_contact']}.record_type_id = {$sourceID}
  50. INNER JOIN civicrm_contact civicrm_contact_source
  51. ON {$this->_aliases['civicrm_activity_contact']}.contact_id = civicrm_contact_source.id
  52. + LEFT JOIN civicrm_case_activity {$this->_aliases['civicrm_case_activity']}
  53. + ON {$this->_aliases['civicrm_activity']}.id = {$this->_aliases['civicrm_case_activity']}.activity_id
  54. {$this->_aclFrom}";
  55.  
  56. if ($this->isTableSelected('civicrm_email')) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement