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-21701 - ensure street addresses are parsed #11579

Merged
merged 1 commit into from
Jan 23, 2018

Conversation

jmcclelland
Copy link
Contributor

@jmcclelland jmcclelland commented Jan 23, 2018

Even if USPS street parsing is disabled.

Overview

Ensure that when addresses are saved, the component parts (street number, street name, apartment, etc) are properly parsed. Also ensures that the address that is displayed on the summary screen matches the address displayed when you click to edit the address.

Before

If your install did have street address parsing enabled, but did not have the USPS parsing enabled, then when an address was saved, it was not parsed into it's component parts.

If updating an address, it means that the previous address's component parts were still saved in the component part fields, but the new address was saved in the "street_address" field and displayed on the summary page.

After

With this patch, the address is always properly parsed (providing address parsing is enabled).

Technical Details

Note: if you ignore white space, the code change is quite minimal -it just adjusts where the closing brace for the USPS if / then statement ends.

Comments


Even if USPS street parsing is disabled.
@eileenmcnaughton
Copy link
Contributor

It's almost like you knew what I was going to say & got in before me :-)

@eileenmcnaughton
Copy link
Contributor

I took a look at this & technically the change is to move the address parsing action outside of the check for USPS enabled - per comments above & I'm satisfied the unit test demonstrates this working.

Unit test covers api so I will also close https://issues.civicrm.org/jira/browse/CRM-14460

@eileenmcnaughton eileenmcnaughton merged commit 6fa2a79 into civicrm:master Jan 23, 2018
@mlutfy mlutfy added this to the 4.7.31 milestone Feb 9, 2018
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