Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-21761

Incorrect, duplicate state/province abbreviations in database

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      Four of the countries in the database have state/provinces with duplicate abbreviations, due to incorrect data. This means that trying to look up a state/province based on country and state/province abbreviation could return an incorrect result.

      The following query displays the countries for which there are duplicate state/province abbreviations:

      SELECT country_id, abbreviation, COUNT(*) FROM civicrm_state_province GROUP BY country_id, abbreviation HAVING COUNT(*) > 1;
      

      The abbreviations should be as follows:

      • Cameroon's "South" state/province should have the abbreviation 'SU' (not 'SW', which is the abbreviation for "South-West").
      • Finland's "Satakunta" state/province should have the abbreviation 'SA' (not 'SK', which is the abbreviation for "South Karelia").
      • India's "Chhattisgarh" state/province should have the abbreviation 'CT' (not 'CH', which is the abbreviation for "Chandigarh").
      • Norway's "Telemark" state/province should have the abbreviation '08' (not '06', which is the abbreviation for "Buskerud").

      There may well be other incorrect state/province abbreviations in the database. These are just the ones that resulted in countries having duplicate state/province abbreviations.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kirk Kirk Jackson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: