Bad Import of State Field

On Version 9.0.3 I have imported via XLS (spreadsheet) for both Third Party as well as Contacts and in both instances instead of importing the state of “CA” California it imports it as “CAGLIARI”. In all cases it dies see the “US” entry and accepts and import the “United States” as country.

I have attached an copy of my import files for both.

In addition the “State” field is not available as a column in the full List view. How can that be added for sort purposes

You need to know the id/ref (unique in the table) of the state to import it correctly. Importing it using the abbreviation just matches it to the first one, as you have seen.
www.dolibarr.org/t/adding-country-state-province/16578/1

I worked on this, and my changes got into the development version,:

Since then I have not been working on Dolibarr so I don’t know which version of Dolibarr will have those changes (9, 10, 11?).