Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-15143

Add postal_code as an option for Contact Autocomplete search and Contact Reference search

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.5
    • Fix Version/s: None
    • Component/s: Core CiviCRM
    • Labels:
      None
    • Documentation Required?:
      User and Admin Doc

      Description

      In 4.4 you can add to most option groups, so it is easy to add postal_code as a option for both the option groups contact_autocomplete_options and contact_reference_options. (see http://forum.civicrm.org/index.php/topic,32916 for reasons to include postal code)

      In 4.5 those option groups are 'locked' so that you can't add postal_code to them through the admin UI.

      (in early June) dgg asked me to check what happened in 4.5 if the civicrm_option_values table was edited directly with a view to having postal_code included as standard in the civicrm_option_values table.

      If 'postal_code' is added as option for the contact_autocomplete_options and contact_reference_options option groups then postal_code becomes an option that can be selected for Autocomplete Contact Search and Contact Reference Options on the Search Preferences page. With that option selected the searches work without error.

      If someone can point me in the right direction, I will try to create patches to include these values as standard in the civicrm_option_values table.

      The data to insert is:
      (XXX,YY,'Postal Code','8','postal_code',NULL,0,NULL,8,NULL,0,0,1,NULL,NULL,NULL)

      where XXX is civicrm_option_values.id and YY = civicrm_option_group.id for each of the two option groups (44 and 45 in a new install of 4.5, but in my existing 4.4 install 44 and 221).

      (Currently last value for XXX in master/sql/civicrm_generated.mysql is 754)

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              jchester Joanne Chester
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: