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

Alphanumeric text converts number to integer, cutting off at 2147483647

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.8
    • Fix Version/s: 2.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      When an alphanumeric text field contains a number, it is converted to an integer before being displayed. The result is that its maximum value is 2147483647 and that a prefixed "+" is removed. The data is stored correctly in the database but it is not correctly displayed. Some examples:

      123 is displayed as 123
      +123 is displayed as 123
      x123 is displayed as x123
      +12345678901 is displayed as 2147483647
      x12345678901 is displayed as x12345678901

      This is unexpected behavior when using the field for telephone numbers or ID cards for instance. This has been experienced by other users as well, as indicated by http://forum.civicrm.org/index.php/topic,962.0.html.

      The solution would be to output the value as-is, there's really no need for an extra filter.

        Attachments

          Activity

            People

            • Assignee:
              kiran.jagtap Kiran Jagtap
              Reporter:
              wmostrey Wim Mostrey
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: