Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-20023: Do not require state_province value to use state_province_id value. #9839

Conversation

xurizaemon
Copy link
Member

@xurizaemon xurizaemon commented Feb 15, 2017

Both Google and Yahoo geocoders would ignore a passed in 'state_province_id' unless it was accompanied by a non-empty 'state_province' value.

This resolved only to "U.S.A" -

CRM_Utils_Geocoder_Google::format([
  'state_province_id' => '1022',
  'country' => 'U.S.A'
]);

But this trickery would resolve to "Minnesota, U.S.A"

CRM_Utils_Geocoder_Google::format([
  'state_province' => 'Blueberry muffin',
  'state_province_id' => '1022',
  'country' => 'U.S.A'
]);

With the submitted patch, the former will correctly resolve the state_province_id.


Copy link
Contributor

@seamuslee001 seamuslee001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me @eileenmcnaughton @xurizaemon and i have opened another PR here https://github.com/civicrm/civicrm-core/pull/9958/files to create a test for this

@eileenmcnaughton eileenmcnaughton merged commit 6f5a5dd into civicrm:master Mar 9, 2017
@eileenmcnaughton
Copy link
Contributor

Thanks @seamuslee001 @xurizaemon

monishdeb pushed a commit to monishdeb/civicrm-core that referenced this pull request May 2, 2017
…_province_id

CRM-20023: Do not require state_province value to use state_province_id value.
@eileenmcnaughton eileenmcnaughton deleted the CRM-20023-geocode_state_province_id branch January 18, 2018 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants