Details
-
Type: Patch
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6.3
-
Fix Version/s: 4.7
-
Component/s: CiviCase, Drupal Integration Modules
-
Labels:None
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
Originally posted here: http://civicrm.stackexchange.com/questions/3214/tags-used-for-cases-activities-or-attachments-in-drupal-views/3249?noredirect=1#comment2349_3249
Drupal Views does not relate case tag to case.
In sites/all/modules/civicrm/drupal/modules/views/components/civicrm.core.inc, There is tag section that joins tags to contacts and activities but nothing joining tags to cases.
Adding:
$data['civicrm_tag']['table']['join']['civicrm_case'] = array( 'left_table' => 'civicrm_entity_tag', 'left_field' => 'tag_id', 'field' => 'id', );
and
$data['civicrm_entity_tag']['table']['join']['civicrm_case'] = array(
// Directly links to tag table
'left_field' => 'id',
'field' => 'entity_id',
'extra' => array(
array(
'field' => 'entity_table',
'value' => 'civicrm_case',
'numeric' => FALSE,
),
),
);
fixes the issue.