Import data for floating point fields wrongly saved #4128

Open
opened 2026-02-20 16:14:02 -05:00 by deekerman · 7 comments
Owner

Originally created by @timo-ecm2 on GitHub (Nov 21, 2019).

Issue

If I try to import a csv document to a custom module I see something strange happening to floating point fields. In that csv document I have two floating point fields with the values 4,25 and 5,25. I have made this csv document with LibreOffice [Charset: Unicode (UTF-8) and
Language: Standaard Nederlandss (NL)]. In this import document, the European notations is applied for both separators. I used the comma as its decimal separator and a dot as the thousands separator.

After import the values of both fields changed from 4,25 and 5,25 to 425,00 and 525,00. I am not able to do an import with floating point fields. When I work with those fields in SuiteCRM and change them manually in editview or quick edit everything works fine. Values like 4,25 or 5,25 do not change after I saved them. They stay the same. It happened only after import.

Expected Behavior

After import the content of floating point fields should show us values of 4,25 and 5,25.

Actual Behavior

After import the content of floating point fields changed from 4,25 and 5,25 to 425,00 and 525,00.

Possible Fix

I do not know yet.

Steps to Reproduce

  1. Make a simple csv document with at least one floating point field for a custom module and add value 4,25.
  2. Use the comma as its decimal separator and a dot as the thousands separator.
  3. Use the import Wizard and take all necessary steps to do a successful import.
  4. Check after import the listview of that record in that custom module and notice the change from 4,25 to 425,00.
  5. Check after import the detailview of that record in that custom module and notice the change from 4,25 to 425,00.

Context

Busy with importing data to a custom module with also floating point fields.

Used system

SuiteCRM Version used: 7.10.22
Browser name and version: Version 78.0.3904.97 (Official Build) (64-bit)
Environment name and version: MariaDB 10.2, PHP 7.2
Operating System and version: Windows 10

Originally created by @timo-ecm2 on GitHub (Nov 21, 2019). #### Issue If I try to import a csv document to a custom module I see something strange happening to floating point fields. In that csv document I have two floating point fields with the values 4,25 and 5,25. I have made this csv document with LibreOffice [Charset: Unicode (UTF-8) and Language: Standaard Nederlandss (NL)]. In this import document, the European notations is applied for both separators. I used the comma as its decimal separator and a dot as the thousands separator. After import the values of both fields changed from 4,25 and 5,25 to 425,00 and 525,00. I am not able to do an import with floating point fields. When I work with those fields in SuiteCRM and change them manually in editview or quick edit everything works fine. Values like 4,25 or 5,25 do not change after I saved them. They stay the same. It happened only after import. #### Expected Behavior After import the content of floating point fields should show us values of 4,25 and 5,25. #### Actual Behavior After import the content of floating point fields changed from 4,25 and 5,25 to 425,00 and 525,00. #### Possible Fix I do not know yet. #### Steps to Reproduce 1. Make a simple csv document with at least one floating point field for a custom module and add value 4,25. 2. Use the comma as its decimal separator and a dot as the thousands separator. 3. Use the import Wizard and take all necessary steps to do a successful import. 4. Check after import the listview of that record in that custom module and notice the change from 4,25 to 425,00. 5. Check after import the detailview of that record in that custom module and notice the change from 4,25 to 425,00. #### Context Busy with importing data to a custom module with also floating point fields. #### Used system SuiteCRM Version used: 7.10.22 Browser name and version: Version 78.0.3904.97 (Official Build) (64-bit) Environment name and version: MariaDB 10.2, PHP 7.2 Operating System and version: Windows 10
Author
Owner

@Mac-Rae commented on GitHub (Nov 22, 2019):

Hi @timo-ecm2,

Could you please try to change your default 1000s separator and Decimal Symbol in your profile;

Press the "Profile" button within the user drop-down menu on the navigation bar and navigate to the bottom of the Advanced tab. You should find the 2 fields which you can update to your preferences. Afterwards hit save and retest to see if the issue persists.

Let me know if this makes any difference 😄

@Mac-Rae commented on GitHub (Nov 22, 2019): Hi @timo-ecm2, Could you please try to change your default 1000s separator and Decimal Symbol in your profile; Press the "Profile" button within the user drop-down menu on the navigation bar and navigate to the bottom of the Advanced tab. You should find the 2 fields which you can update to your preferences. Afterwards hit save and retest to see if the issue persists. Let me know if this makes any difference :smile:
Author
Owner

@timo-ecm2 commented on GitHub (Nov 22, 2019):

Hi @Mac-Rae ,
Thnx for your advice, but it did not help. Still the strange change rom 4,25 to 425,00.

@timo-ecm2 commented on GitHub (Nov 22, 2019): Hi @Mac-Rae , Thnx for your advice, but it did not help. Still the strange change rom 4,25 to 425,00.
Author
Owner

@Mac-Rae commented on GitHub (Nov 25, 2019):

Thanks @timo-ecm2,

I'll look at replicating this today!

@Mac-Rae commented on GitHub (Nov 25, 2019): Thanks @timo-ecm2, I'll look at replicating this today!
Author
Owner

@timo-ecm2 commented on GitHub (Dec 30, 2019):

Hi @Mac-Rae,
Any luck with replicating?

@timo-ecm2 commented on GitHub (Dec 30, 2019): Hi @Mac-Rae, Any luck with replicating?
Author
Owner

@Mac-Rae commented on GitHub (Dec 31, 2019):

Hi @timo-ecm2,

I do apologise, think this go lost in the prep for a release and never got completed. Do you have an example CSV you could provide?

Thanks in advance 👍

@Mac-Rae commented on GitHub (Dec 31, 2019): Hi @timo-ecm2, I do apologise, think this go lost in the prep for a release and never got completed. Do you have an example CSV you could provide? Thanks in advance :+1:
Author
Owner

@timo-ecm2 commented on GitHub (Jan 3, 2020):

Hi @Mac-Rae,
Yes, sure, I will add an anonymized csv file and please follow the steps to reproduce.

test-custom-module.zip

@timo-ecm2 commented on GitHub (Jan 3, 2020): Hi @Mac-Rae, Yes, sure, I will add an anonymized csv file and please follow the steps to reproduce. [test-custom-module.zip](https://github.com/salesagility/SuiteCRM/files/4018868/test-custom-module.zip)
Author
Owner

@timo-ecm2 commented on GitHub (Mar 12, 2020):

Hi @Mac-Rae,
Any luck?

@timo-ecm2 commented on GitHub (Mar 12, 2020): Hi @Mac-Rae, Any luck?
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#4128
No description provided.