Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.1.0
-
Component/s: None
-
Labels:None
Description
Currently, when importing contacts from WHMCS, we pull in the state field. In our experience, the field from WHMCS is inconsistent. Sometimes the field contains the ISO state code (e.g. CA) but sometimes it contains the full state name (e.g. California). In the latter case we simply truncate the content to the first 3 characters. Instead we should:
- Get the list of states from Blesta using States::getList()
- Check if the field matches any of the state codes
- If the field doesn't match, try mapping the field using the 'name' and 'code' columns
- If there is no matching 'name', truncate the field to 3 characters (make sure this is multibyte compatible)