Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datagrid: Mask for a large number is incorrectly transposing the number #5318

Closed
claudenbach opened this issue Jun 15, 2021 · 10 comments
Closed

Comments

@claudenbach
Copy link
Contributor

claudenbach commented Jun 15, 2021

Describe the bug
When entering a large integer number into a list cell, the entered value is being incorrectly transformed with the applied mask. An 18 digit integer number is being transformed from 123456789012345678 into 123456789012345680.

Steps to reproduce the behavior:

  1. Using the attached 'test-integer-maskoptions.html'
  2. Click on a Batch Number cell
  3. Enter the value of 123456789012345678 into the cell and tab out
  4. Notice that the number has been transposed to 123456789012345680

Expected behavior
Mask is correctly applied to the integer number

Version

  • ids-enterprise: v4.51.0-dev

Additional context
This is a critical issue for Landmark since the user is unable to enter say a Batch Number correctly or to filter on an 18 digit Batch Number.

Seems to be related to #5308,

Is an issue for both List and Form. For the form example could use the following...
Goto https://master-enterprise.demo.design.infor.com/components/locale/test-format-big-negative.html
Enter the value of 123456789012345678
Click on the Format button

@claudenbach
Copy link
Contributor Author

Git-5318.zip

@tmcconechy
Copy link
Member

tmcconechy commented Jun 15, 2021

Is this from before or after fixing #5308 ? I.E. Can you try NG 9.5.1 with the fix?

@tmcconechy tmcconechy self-assigned this Jun 15, 2021
@tmcconechy tmcconechy added this to To do in Enterprise 4.53.x (June 2021) Sprint via automation Jun 15, 2021
@claudenbach
Copy link
Contributor Author

Here is the Landmark example...

LMCLIENT-35901

@claudenbach
Copy link
Contributor Author

Sure, I can retest with NG 9.5.1

@tmcconechy
Copy link
Member

Still see the issue i tested it with the fix too.

FYI max supported number is 18.6 https://github.com/infor-design/enterprise/blob/main/src/utils/number.js#L49
123456789012345678

So this should work. Taking a look

@Sovia
Copy link
Contributor

Sovia commented Jun 15, 2021

We also saw some weirdness, where if the last two digits were 71 it would be changed to 60.

So: 123456789012345671 -> 123456789012345660

@tmcconechy
Copy link
Member

FYI the issue is this number is outside whats supported in JS.

parseFloat('123456789012345678')
123456789012345680

I think to fix we can make parseNumber use a string.

@tmcconechy
Copy link
Member

Accidentally pushed the fix to main directly so no PR. Steps to test: 5a5c1b2

@tmcconechy
Copy link
Member

So two patches done
NG 9.4.6 -> This has 4.50.4 which contains just #5308
NG 9.5.2 -> This has 4.51.4 which contains both #5308 and #5318

@tmcconechy tmcconechy moved this from Pending Review to Ready for QA (beta) in Enterprise 4.53.x (June 2021) Sprint Jun 17, 2021
@jbrcna
Copy link
Contributor

jbrcna commented Jun 18, 2021

this is now working as expected. thank you
v4.53.0-dev
https://main-enterprise.demo.design.infor.com/components//locale/test-format-big-negative.html
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high type: bug 🐛 [2] Velocity rating (Fibonacci)
Projects
No open projects
Development

No branches or pull requests

4 participants