CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.3 Release Testing (Moderator: pdelbar) »
  • Drupal Views: custom fields on address do not work
Pages: [1]

Author Topic: Drupal Views: custom fields on address do not work  (Read 1082 times)

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Drupal Views: custom fields on address do not work
March 13, 2013, 08:56:45 am
Hi,

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

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Drupal Views: custom fields on address do not work
March 13, 2013, 09:44:47 am

dave:

u should file an issue for the "soon to come and help us" views maintainer :)

However, based on our past record, i dont think the below will be fixed in 4.3 (since we dont have someone taking care of the views code right now :(

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Drupal Views: custom fields on address do not work
March 13, 2013, 10:26:48 am
Issue created: http://issues.civicrm.org/jira/browse/CRM-12110

Dave

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.3 Release Testing (Moderator: pdelbar) »
  • Drupal Views: custom fields on address do not work

This forum was archived on 2017-11-26.