Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-21016: Allow Drupal views to be used for Notes related to contributions #468

Merged
merged 1 commit into from
Aug 8, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions modules/views/components/civicrm.core.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1139,24 +1139,23 @@ function _civicrm_core_data(&$data, $enabled) {
civicrm_views_add_fields($fields, $data['civicrm_address'], 'civicrm_address');

// CIVICRM_NOTE table

$data['civicrm_note']['table']['group'] = t('CiviCRM Note');
$data['civicrm_note']['table']['join'] = array();

// Explain how this table joins to others.
$data['civicrm_note']['table']['join'] = array(
// Directly links to contact table.
'civicrm_contact' => array(
foreach (array_keys(CRM_Core_BAO_Note::entityTables()) as $entityTable) {
// Explain how this table joins to others.
$data['civicrm_note']['table']['join'][$entityTable] = array(
'left_field' => 'id',
'field' => 'entity_id',
'extra' => array(
array(
'field' => 'entity_table',
'value' => 'civicrm_contact',
'value' => $entityTable,
'numeric' => FALSE,
),
),
),
);
);
}

// NOTE TEXT
$data['civicrm_note']['note'] = array(
Expand Down