Configured decimal separator not used correctly when importing float values #5277

Open
opened 2026-02-20 16:32:17 -05:00 by deekerman · 0 comments
Owner

Originally created by @SinergiaCRM on GitHub (Nov 18, 2024).

Issue

When importing a data file with a column that corresponds to a float field, if the decimal separator that the user has is different from the dot symbol (.), the imported value for the float field is not correct.

Possible Fix

Implement the solution that is applied with decimal fields in the importSanitize() function of the include/SugarFields/Fields/Float/SugarFieldFloat.php file

Steps to Reproduce the Issue

  1. Set the decimal comma separator (,) in the user profile
  2. Create a Float type field in the Contacts module
  3. Create a record and assign a value to the previous field
  4. Export the Contact and edit the generated file to leave only the last name column (required field) and the Float field column.
  5. Import the file and check that the value of the Float field is not the same and that it uses the decimal symbol configured in the logged in user profile

Context

No response

Version

7.14.6

What browser are you currently using?

Firefox

Browser Version

131.0.3 (64-bit)

Environment Information

MySQL, PHP Version 8.2

Operating System and Version

Ubuntu 22.04.4 LTS

Originally created by @SinergiaCRM on GitHub (Nov 18, 2024). ### Issue When importing a data file with a column that corresponds to a float field, if the decimal separator that the user has is different from the dot symbol (.), the imported value for the float field is not correct. ### Possible Fix Implement the solution that is applied with decimal fields in the **importSanitize()** function of the **include/SugarFields/Fields/Float/SugarFieldFloat.php** file ### Steps to Reproduce the Issue 1. Set the decimal comma separator (,) in the user profile 2. Create a Float type field in the Contacts module 3. Create a record and assign a value to the previous field 4. Export the Contact and edit the generated file to leave only the last name column (required field) and the Float field column. 5. Import the file and check that the value of the Float field is not the same and that it uses the decimal symbol configured in the logged in user profile ### Context _No response_ ### Version 7.14.6 ### What browser are you currently using? Firefox ### Browser Version 131.0.3 (64-bit) ### Environment Information MySQL, PHP Version 8.2 ### Operating System and Version Ubuntu 22.04.4 LTS
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#5277
No description provided.