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

code/dev/69: Change Approach For Setting state_province_name #12003

Conversation

vinuvarshith
Copy link
Contributor

@vinuvarshith vinuvarshith commented Apr 19, 2018

Overview

This issue is related to this existing issue

https://issues.civicrm.org/jira/browse/CRM-21830

The PR for the above issue is here

#11776

Though this fixes the basic issue, it still doesn't work for all fields.

Before

If state_province field name is not of the form "state_province-{$billingLocationTypeID}", then state_province_name is empty. Which means field names of form 'billing_state_province-{#}' and 'billing_state_province_id-{#}' results in empty state_province_name when "state_province_name" token is used.

After

I have changed the way "state_province_name' is set and this is simple and works for all cases.

https://lab.civicrm.org/dev/core/issues/69

@civicrm-builder
Copy link

Can one of the admins verify this patch?

@seamuslee001
Copy link
Contributor

Jenkins ok to test

@vinuvarshith vinuvarshith force-pushed the dev/core/69-fix-state-province-name-token-issue branch from 6a68123 to 8568b05 Compare April 20, 2018 10:59
@eileenmcnaughton
Copy link
Contributor

I think we'd need to add a unit test for this - can we help you write one?

@vinuvarshith vinuvarshith force-pushed the dev/core/69-fix-state-province-name-token-issue branch from f71eabb to 3212bdb Compare May 1, 2018 16:24
@vinuvarshith
Copy link
Contributor Author

@eileenmcnaughton I have added a testcase for formatted billing address

@vinuvarshith vinuvarshith force-pushed the dev/core/69-fix-state-province-name-token-issue branch from 3212bdb to 7a2c4cf Compare May 1, 2018 16:27
@eileenmcnaughton
Copy link
Contributor

great!

@eileenmcnaughton
Copy link
Contributor

OK - I stepped through this in the test & agree the test covers a range of scenarios and that the code change makes sense. Merging

@eileenmcnaughton eileenmcnaughton merged commit 74aa6ca into civicrm:master May 16, 2018
@civicrm-builder
Copy link

Can one of the admins verify this patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants