Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.3
-
Fix Version/s: 4.4.0
-
Component/s: CiviCase, Drupal Integration Modules
-
Labels:None
Description
Dear CiviCRM team,
I added CiviCase support to the Views3 integration. Attached you will find my first patch. It works for me, but as I am new to CiviCRM there is certainly some things which might have to be improved.
The following pages from my test installation might serve as a demo. Please note that I'm joining fields from Activities, Relationship, Case and Contact tables. In "Relationships" the contact table is joined several times in one data row for displaying information on both Contact A and Contact B of both contact and case relationships.
http://viazni.pakalennie.de/cases
http://viazni.pakalennie.de/activities
http://viazni.pakalennie.de/relationships
Note 1: I encountered a Drupal error with the current definition of Join fields for Contact A and Contact B in the Relationship section of the Views 3 integration module. I did a small modification marked with "FTW - Fixed Error in Drupal", after which joining using both Contact A and B worked smoothly.
Note 2: I am still brutally filtering out empty subtypes in civicrm_handler_field_pseudo_constant.inc, as otherwise the case type IDs will not match the case type ID array returned by CRM_Case_PseudoConstant/caseType (which are single-typed). The line $val = str_replace("\x01", '', $val); should be eventually removed for some filtering of the double-typed case type ID somewhere else in the code (as it seems to be the case with contact type IDs), but I am still not sure where to look exactly. However, with the replace function hack everything seems to work fine for the meantime.
So please take the patch with a grain of salt, but it would be nice if something along these lines could be included in future versions of CiviCRM. Thank you.
Tobias