Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.2.6
-
Fix Version/s: 4.3.0
-
Component/s: Drupal Integration Modules
-
Labels:None
Description
Currently Civicrm Views Integration works with Civicase Activities, as long as the standard activity type is selected when creating the activity (this appears to have no adverse effects on civicase). However, the current revisioning system creates new activities when an case activity is updated. With no way to determine which activity is the current one, views shows a separate activity for each revision (including deleted activities). This problem can be resolved by adding the following to the Activities section in civicrm/drupal/modules/views/components/civicrm.core.inc:
//Custom added to fix civicase dupe problem.
$data['civicrm_activity']['is_current_revision'] = array(
'title' => t('Current Revision'),
'help' => t('Use to dedupe Civicase revisions'),
'field' => array(
'handler' => 'views_handler_field_boolean',
'click sortable' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument',
),
'filter' => array(
'handler' => 'views_handler_filter_boolean_operator',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['civicrm_activity']['is_deleted'] = array(
'title' => t('Is Deleted'),
'help' => t('If the current Activity is deleted. Also used to dedupe Civicase revisions'),
'field' => array(
'handler' => 'views_handler_field_boolean',
'click sortable' => TRUE,
),civicrm.core.inc
'argument' => array(
'handler' => 'views_handler_argument',
),
'filter' => array(
'handler' => 'views_handler_filter_boolean_operator',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
Adding this code allows the user to filter against revised and/or deleted activities, fixing the problem.