Details
-
Type:
Bug
-
Status: Done/Fixed
-
Priority:
Minor
-
Resolution: Cannot Reproduce
-
Affects Version/s: 4.6.10
-
Fix Version/s: Unscheduled
-
Component/s: Core CiviCRM
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:User and Admin Doc
-
Funding Source:Contributed Code
Description
When using a sub-type as the left-hand (A) side of a relationship with a default type on the right (B), the following notices appear on the custom fields form (/civicrm/admin/custom/group?action=add&reset=1):
Notice: Undefined index: 20_a_b in CRM_Custom_Form_Group::getFormattedList() (line 536 of /.../civicrm/CRM/Custom/Form/Group.php).
Notice: Undefined index: 20_a_b in CRM_Custom_Form_Group::getFormattedList() (line 538 of /.../civicrm/CRM/Custom/Form/Group.php).
Notice: Undefined index: 20_a_b in CRM_Custom_Form_Group::getFormattedList() (line 539 of /.../civicrm/CRM/Custom/Form/Group.php).
To reproduce:
- Create a contact subtype (e.g. 'student' as a sub-type of individual)
- Define a relationship between the new contact sub-type and a default contact type (e.g. organization)
- Add a 'New Custom Field Set' (/civicrm/admin/custom/group?action=add&reset=1) and the warning will be displayed.
- Select 'Relationships' in the 'Used for' field
- Scroll through the select box, and the relevant option will be missing part of the label.
Note the following:
- reversing the relationship resolves the issue (so there's an easy work-around)
- having both contacts in the relationship be sub-types (another easy work-around).
I haven't gone any further in testing whether this is really just a form-building/display bug, or whether defining a field based on this relationship would fail in other ways.
Would love to fund to get this issue resolved if possible. What kind of time do you think is involved with a bug fix for this? Would that fix the issue in all platforms (ie. Drupal, Joomla, Wordpress)?
Thanks!