Arithmetic Overflow Error When Converting Float to Numeric Datatype in SQL Server on Windows OS

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 8.20.12, 8.20.22, 9.12.2
    • Component/s: Custom fields
    • None
    • 8.2
    • 4
    • Severity 3 - Minor

      Issue Summary

      An arithmetic overflow error occurs when trying to convert a float to a numeric datatype in a SQL Server database running on a Windows OS. This issue is specifically encountered when using a Number Field in Jira Software.
      In the case of PostgresDB on Linux, this issue is not occurring, but it can happen when migrating from Postgres to MS SQL database using XML backup/restore, and there is a such field in the source instance.

      This is reproducible on Data Center: Yes

      Steps to Reproduce

      1. Set up a SQL Server database on a Windows OS.
      2. Install and configure Jira Service Management Data Center on a Windows OS.
      3. Create a project with a Number Field.
      4. Create a issue and attempt to enter '100000000000000' into the Number Field.

      Expected Results

      The number should be successfully entered into the Number Field without any errors.

      Actual Results

      An arithmetic overflow error occurs when trying to convert a float to a numeric datatype, and the number cannot be entered into the Number Field. The following exception is thrown in the atlassian-jira.log file:

      Caused by: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:INSERT INTO dbo.customfieldvalue (ID, ISSUE, CUSTOMFIELD, UPDATED, PARENTKEY, STRINGVALUE, NUMBERVALUE, TEXTVALUE, DATEVALUE, VALUETYPE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Arithmetic overflow error converting float to data type numeric.)
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available.

        1. error message-2.png
          230 kB
          Tomoya Suzuki

            Assignee:
            Unassigned
            Reporter:
            Tomoya Suzuki
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: