Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.15
-
Fix Version/s: 4.7.20
-
Component/s: Core CiviCRM
-
Labels:
-
Versioning Impact:Minor (add functionality in backwards-compatible manner)
-
Documentation Required?:None
-
Funding Source:Contributed Code
-
Verified?:No
Description
The geocoders (CRM_Utils_Geocode_Google and CRM_Utils_Geocode_Yahoo) have a hook "hook_civicrm_geocoderFormat" which allows an extension to manipulate the address object during geocoding.
Unfortunately, the current CRM_Utils_Address_BatchUpdate->processContacts, which calls the geocode method, will only update a few fields after the geocoding and hook processing are complete :
- geo_code_1
- geo_code_2
- postal_code
- postal_code_suffix
If the extension using the hook modifies any other fields, the new values are being discarded by CRM_Utils_Address_BatchUpdate->processContacts.
This improvement would allow other fields to also be updated if they have been manipulated by the geocoder / hook function :
- city
- county_id
- state_province_id
- country_id
- street_name
- street_number
- street_unit
PR 9794 has been submitted for this.