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

long postal code in db prevents searching by zipcode range

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.22
    • Fix Version/s: 4.7.24
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      A long bogus zip code in database such as 1234567891011121314151617181920 breaks search by zip code range.

      MySQL cannot cast such a large number as an integer; the database error is [nativecode=1292 ** Truncated incorrect INTEGER value: '1234567891011121314151617181920']

      The query REGEXP could be tweaked to limit the search to a certain length of e.g. 10 digits or whatever is appropriate.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mfb Mark Burdett
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: