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.1 Release Testing (Moderator: Kurund Jalmi) »
  • Views CiviCRM Relationships: Relationship Type A-to-B Empty field
Pages: [1]

Author Topic: Views CiviCRM Relationships: Relationship Type A-to-B Empty field  (Read 1360 times)

co-operatives uk

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • CiviCRM version: 4.2.0
  • CMS version: Drupal 7.15
  • MySQL version: 5
  • PHP version: 5
Views CiviCRM Relationships: Relationship Type A-to-B Empty field
January 17, 2012, 05:39:46 am
Hi,

Been trying to set up a view to show the type of relationship the logged in user has with other contacts, but the "CiviCRM Relationships: Relationship Type A-to-B" field kept showing as empty. Have hacked to fix - not sure of the syntax or process for patches, but here's a go:

file: sites/all/modules/civicrm/drupal/modules/views/civicrm/civicrm_handler_field_relationship_type.inc

           require_once 'CRM/Core/PseudoConstant.php';
-             $relationshipType_array = CRM_Core_PseudoConstant::relationshipType( 'name' );
+            $relationshipType_array = CRM_Core_PseudoConstant::relationshipType( 'label' );

Will shout here if it causes any problems.

co-operatives uk

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • CiviCRM version: 4.2.0
  • CMS version: Drupal 7.15
  • MySQL version: 5
  • PHP version: 5
Re: Views CiviCRM Relationships: Relationship Type A-to-B Empty field
January 17, 2012, 07:29:51 am
Nope, that's not done it. Displays the correct label for custom relationships, but displays blank for the default ones.

co-operatives uk

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • CiviCRM version: 4.2.0
  • CMS version: Drupal 7.15
  • MySQL version: 5
  • PHP version: 5
Re: Views CiviCRM Relationships: Relationship Type A-to-B Empty field
January 17, 2012, 07:51:19 am
Ah - the fix did work: just realised my bespoke relationships are Organisation > Individual and the default ones are Individual > Organisation: that's why I couldn't get the Employee field to display. Patch stands.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.1 Release Testing (Moderator: Kurund Jalmi) »
  • Views CiviCRM Relationships: Relationship Type A-to-B Empty field

This forum was archived on 2017-11-26.