Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.1.6, 4.3.0
-
Fix Version/s: 4.4.0
-
Component/s: Drupal Integration Modules
-
Labels:
Description
See http://forum.civicrm.org/index.php/topic,28017.0.html :
Tested in 4.3.beta2:
Custom fields on Address do not work in Drupal Views. The fields are available to select in the Views UI but I found two problems that prevent data being accessed for these fields:
1. Join to the wrong table. Here's an example excerpt from the SQL generated by Views:
LEFT JOIN
{civicrm_value_additional_address_fields_10}civicrm_value_additional_address_fields_10 ON civicrm_contact.id = civicrm_value_additional_address_fields_10.entity_id
however this custom field set extends Address, so its entity_id values are address ids, not contact ids. Double-checking: this from "show create table civicrm_value_additional_address_fields_10":
CONSTRAINT `FK_civicrm_value_additional_address_08dd2bafb6164f15` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_address` (`id`) ON DELETE CASCADE
2. Need to be able to select Location Type when setting up the field, as for standard address fields.
Cheers,
Dave