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

          [CRM-2750] Alphanumeric text converts number to integer, cutting off at 2147483647
          Donald A. Lobo added a comment -

          not sure why we had that filter, but now we filter based on data type rather than value (which was obviously the wrong way to do it!)

          Wim Mostrey added a comment -

          Could you indicate where and what I should change on the 1.8 version to get this fixed?

          Donald A. Lobo added a comment -

          please click on the fisheye tab near the first comment box and follow the links

          http://issues.civicrm.org/jira/browse/CRM-2750?page=com.atlassian.jira.ext.fisheye:fisheye-issuepanel

          Kiran Jagtap added a comment -

          Tested and Confirmed for 2.1 ( r - 16385 )

            People

            • Assignee:
              Kiran Jagtap
              Reporter:
              Wim Mostrey

              Dates

              • Created:
                Updated:
                Resolved: