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

Locale: Mask incorrectly applied on large negative number. #5308

Closed
Sovia opened this issue Jun 11, 2021 · 16 comments · Fixed by #5311
Closed

Locale: Mask incorrectly applied on large negative number. #5308

Sovia opened this issue Jun 11, 2021 · 16 comments · Fixed by #5311
Assignees
Labels
priority: critical team: landmark For Landmark issues type: bug 🐛 [3] Velocity rating (Fibonacci)

Comments

@Sovia
Copy link
Contributor

Sovia commented Jun 11, 2021

Describe the bug
The mask is adding a 0 to large negative numbers.

To Reproduce

  1. Navigate to https://master-enterprise.demo.design.infor.com/components/locale/test-format-big-negative.html
  2. Enter the value -1,482,409,800.81
  3. Hit the format button
  4. See that the read only field now has an additional 0 inserted into it: -14824098000.81

Expected behavior
Extra zeros should not be inserted into the number

Version

  • ids-enterprise: v4.51.0-dev

Screenshots
MaskOnNegativeBigNumber

Platform

  • Infor Application/Team Name: Infor Landmark
  • Device: All
  • OS Version: All
  • Browser Name: All
  • Browser Version: All

Additional context
If you hit format on the value that initially there, it seems to work. Maybe an issue having a zero before the decimal point?

@tmcconechy tmcconechy added [3] Velocity rating (Fibonacci) team: landmark For Landmark issues type: bug 🐛 labels Jun 11, 2021
@lipetzan
Copy link
Collaborator

Multiple customers (three FSM thus far) reporting this. Raised priority from my perspective.

@tmcconechy tmcconechy added this to To do in Enterprise 4.53.x (June 2021) Sprint via automation Jun 11, 2021
@Sovia
Copy link
Contributor Author

Sovia commented Jun 11, 2021

Only seems to happen for a number with 10 digits before the decimal point

@tmcconechy
Copy link
Member

tmcconechy commented Jun 11, 2021

And only with the minus. What kind of numbers are minus billions? (curious - country debt?)

@Sovia
Copy link
Contributor Author

Sovia commented Jun 11, 2021

Certainly something in financials!

@lipetzan
Copy link
Collaborator

See more on https://jira.lawson.com/browse/LMCLIENT-36032 @tmcconechy

@tmcconechy
Copy link
Member

@EdwardCoyle can you maybe please see about this one and if it has any easy fix?

@vonnyw
Copy link
Contributor

vonnyw commented Jun 11, 2021

@tmcconechy and @EdwardCoyle We need a patch for 4.51 and potentially 4.50 if it's low risk.

@tmcconechy
Copy link
Member

Have to see about 4.50 we don't usually patch that far back and i think it might have a problem building. But i will try..

Also i know there was another issue you wanted a patch for but i dont know which one? Can you remind me of that other issue and i can add that too to 4.51

@tmcconechy
Copy link
Member

@Sovia do you guys use the "round" option on purpose as far as you know? Or is it just our code doing that by default?

bug is here...

this.truncateDecimals(-1482409800.81, 2, 2, { round: true})
"-14824098000.81"
this.truncateDecimals(-1482409800.81, 2, 2, { round: false})
"-14824098000.81"

@vonnyw
Copy link
Contributor

vonnyw commented Jun 11, 2021

#4974 for 4.51 patch too please.

@EdwardCoyle EdwardCoyle moved this from To do to In progress in Enterprise 4.53.x (June 2021) Sprint Jun 14, 2021
@tmcconechy tmcconechy moved this from In progress to Ready for QA (beta) in Enterprise 4.53.x (June 2021) Sprint Jun 14, 2021
@tmcconechy
Copy link
Member

OK this issue and #4974 are now patched in 4.51.3 -> Did an angular build and its ids-enterprise-ng@9.5.1

@janahintal
Copy link
Contributor

janahintal commented Jun 15, 2021

Working as expected in https://main-enterprise.demo.design.infor.com/components/locale/test-format-big-negative.html?theme=new&mode=light&colors=0066D4

Will now move this ticket to done.

Observation: Unable to input negative sign directly from the field.

Verified in https://main-enterprise.demo.design.infor.com/components/locale/test-format-big-negative.html?
image
image

@vonnyw
Copy link
Contributor

vonnyw commented Jun 15, 2021

@tmcconechy Can we get a patch for 4.50? THanks

@tmcconechy
Copy link
Member

Should we include #5318 as well?

@Sovia
Copy link
Contributor Author

Sovia commented Jun 15, 2021

Only this one in the 4.50 patch please!

@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

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

Successfully merging a pull request may close this issue.

6 participants