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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Relationships and Custom Fields
Pages: [1]

Author Topic: Relationships and Custom Fields  (Read 513 times)

jward50

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.0.1
  • MySQL version: ?
  • PHP version: ?
Relationships and Custom Fields
April 14, 2013, 10:08:13 am
Civicrm 4.3
Drupal 7.21

Hi
I have set up a relationship type which has a set of custom fields attached.
A contact can have more than one of these relationships with an organisation at any one time what makes if different is the custom field however I am not able to enter two relationships with the same start date for one contact.
I get the following error

Notice: Undefined offset: 4 in CRM_Contact_Form_Relationship->postProcess() (line 570 of /****/public_html/****/sites/all/modules/civicrm/CRM/Contact/Form/Relationship.php).

Should it be possible to do this?
Many Thanks
Julie

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: Relationships and Custom Fields
April 14, 2013, 10:24:31 am

This is not possible in the current and previous versions of CiviCRM if the relationship has null  dateswever

However if a relationship does have start/end dates, we do not seem to be checking for overlapping dates. I'll need to take a look at the code to see what the rules are in the case of dates

lobo
« Last Edit: April 14, 2013, 10:32:40 am by Donald 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

jward50

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.0.1
  • MySQL version: ?
  • PHP version: ?
Re: Relationships and Custom Fields
April 14, 2013, 10:45:57 am
All of these relationships have start and end dates, they last for one year at a time.

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: Relationships and Custom Fields
April 14, 2013, 01:50:53 pm

Can you reproduce this error on the demo site which is running 4.3

thanx

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

jward50

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.0.1
  • MySQL version: ?
  • PHP version: ?
Re: Relationships and Custom Fields
April 14, 2013, 10:49:04 pm
On the demo site I get a sensible error saying duplicate relationship.

So where I have an individual holding a certain office in the organisation I will have to set up 17 different relationships instead of one relationship differentiated by the custom field, which makes sense as without the custom field these would be duplicate entries.


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Relationships and Custom Fields

This forum was archived on 2017-11-26.