Changes between Version 6 and Version 7 of CiviCRM GENVASC Report customisation


Ignore:
Timestamp:
03/11/13 18:33:13 (12 years ago)
Author:
Nick Holden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CiviCRM GENVASC Report customisation

    v6 v7  
    5151Let's do a fixed one to test it:
    5252
    53 What we would want would be to over-rule
    54 THIS:
    55 $this->_columns['civicrm_value_gp_surgery_data_13']['extends'] = 'Organization'
    56 WITH:
    57 $this->_columns['civicrm_value_gp_surgery_data_13']['extends'] = 'Relation'
     53In  recruitmentreport.php at around line 404, add the following, into function postProcess() immediately before $this->buildQuery(TRUE); :
     54{{{
    5855
    59 AND ALSO INSERT INTO CRM_Core_BAO_CustomQuery::$extendsMap if we can, thus:
    60 
    61 CRM_Core_BAO_CustomQuery::$extendsMap['Relation'] = 'civicrm_relation'
    62 
     56// Over-ride the custom data 'extends' relationship so that the GP surgery data is referenced to the 'relation' not the 'contact'
     57    if ($this->_columns['civicrm_value_gp_surgery_data_13']['extends'] == "Organization") {
     58      $this->_columns['civicrm_value_gp_surgery_data_13']['extends'] = "Relation";
     59      CRM_Core_BAO_CustomQuery::$extendsMap['Relation'] = 'civicrm_relation';
     60    }
     61   
     62}}}
     63 
    6364This appears to work!