code/dev/69: Change Approach For Setting state_province_name #12003
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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