You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-08-01] [$1000] Web - App does not remove dot from amount in split bill after first try #22361
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Enter any amount and write decimal dot (eg. 1234.)
Click on next and select any users
Click on back twice and observe that normally app removes the dot from the end of amount
Again change the amount or keep the amount the same and write dot in the end.
Again select any users or keep the already selected user and click on next
Go back twice and observe that app no longer removes dot from the amount
Expected Result:
App should remove the dot from the amount if user has not inserted any digit after it.
Actual Result:
App does not removes the dot from the amount when we edit the amount second time even if no digit has been inserted after it.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 1.3.37-2 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation
Problem is here when amount is same. we do not update amount state variable.
it will work fine like if we keep changing amount like, 123. goto Next again go to amount page change amount 1234.. you will see it work as expected. as prevProps.iou.amount !== this.props.iou.amount this condition will become true.
but when we again add . to old amount, our condition will become false. and we can see . is still there.
What changes do you think we should make in order to solve the problem?
Instead of relying on just iou amount changes. we should update state amount variable in navigateToNextPage function. this way our component will have formatted amount value.
changed the title [-]Web - App does not remove dot from amount in split bill after first try[/-][+][$1000] Web - App does not remove dot from amount in split bill after first try[/+]on Jul 6, 2023
the above code eventually will parse the amount to number and convert it to string, which will make sure the amount in string is correct, but when we do not change the value it won't be called, this will have a straightforward fix.
What changes do you think we should make in order to solve the problem?
We should parse the amount to number and convert it to string, for example:
inside navigateToNextPage we should add the following to make sure the value is parsed as the right number and converted to a string. that's the only thing convertToWholeUnit did to set the value without the .
We parse the amount to the number and convert it to a string
when we add a dot again, the old amount and the new amount is the same after parsing, and our condition will become false the state is not updated and we can see the dot is still there
What changes do you think we should make in order to solve the problem?
When we navigate to navigateToNextPage we should parse it again to convert into string and set the right cursor position
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.44-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-08-01. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@eVoloshchak] The PR that introduced the bug has been identified. Link to the PR:
[@eVoloshchak] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@eVoloshchak] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@eVoloshchak] Determine if we should create a regression test for this bug.
[@eVoloshchak] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@puneetlath] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: This is a simple visual bug, I don't think an additional discussion is needed
Determine if we should create a regression test for this bug. Is it easy to test for this bug? Yes
Is the bug related to an important user flow? Yes
Is it an impactful bug? No
The bug has almost zero impact, doesn't affect the user experience at all, I think a regression test isn't needed here
Hello @puneetlath , It seems a speed bonus may be applicable here, as the pull request was ready to merge within 2 daysbut you were OOO. I also experienced a similar case in the past: #20973 (comment)
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Jul 6, 2023
Triggered auto assignment to @puneetlath (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jul 6, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)kushu7 commentedon Jul 6, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
App does not remove dot from amount in split bill after first try
What is the root cause of that problem?
App/src/pages/iou/steps/MoneyRequestAmountPage.js
Lines 150 to 159 in d98a02a
Problem is here when amount is same. we do not update
amountstate variable.it will work fine like if we keep changing amount like,
123.goto Next again go to amount page change amount1234.. you will see it work as expected. asprevProps.iou.amount !== this.props.iou.amountthis condition will become true.but when we again add . to old amount, our condition will become false. and we can see
.is still there.What changes do you think we should make in order to solve the problem?
Instead of relying on just iou amount changes. we should update state
amountvariable innavigateToNextPagefunction. this way our component will have formatted amount value.App/src/pages/iou/steps/MoneyRequestAmountPage.js
Lines 401 to 405 in d98a02a
we can add this here on Line 404
Video
Untitled.mov
What alternative solutions did you explore? (Optional)
None
[-]Web - App does not remove dot from amount in split bill after first try[/-][+][$1000] Web - App does not remove dot from amount in split bill after first try[/+]melvin-bot commentedon Jul 6, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01516b47bd364f3b33
melvin-bot commentedon Jul 6, 2023
Current assignee @puneetlath is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Jul 6, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (
External)getusha commentedon Jul 7, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
App/src/pages/iou/steps/MoneyRequestAmountPage.js
Line 151 in d98a02a
the above code eventually will parse the amount to number and convert it to string, which will make sure the amount in string is correct, but when we do not change the value it won't be called, this will have a straightforward fix.
What changes do you think we should make in order to solve the problem?
We should parse the amount to number and convert it to string, for example:
inside
navigateToNextPagewe should add the following to make sure the value is parsed as the right number and converted to a string. that's the only thingconvertToWholeUnitdid to set the value without the.We also have to set the selection state according to the updated amount.
Screen.Recording.2023-07-07.at.7.10.21.AM.mov
What alternative solutions did you explore? (Optional)
manjesh-yadav commentedon Jul 7, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
App does not remove dot from amount in split bill after first try
What is the root cause of that problem?
App/src/pages/iou/steps/MoneyRequestAmountPage.js
Lines 150 to 159 in d98a02a
What changes do you think we should make in order to solve the problem?
When we navigate to
navigateToNextPagewe should parse it again to convert into string and set the right cursor position22 remaining items
melvin-bot commentedon Jul 25, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.44-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-08-01. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
melvin-bot commentedon Jul 25, 2023
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
puneetlath commentedon Jul 27, 2023
@eVoloshchak friendly reminder about the checklist ahead of next week.
eVoloshchak commentedon Aug 2, 2023
Is it easy to test for this bug? Yes
Is the bug related to an important user flow? Yes
Is it an impactful bug? No
The bug has almost zero impact, doesn't affect the user experience at all, I think a regression test isn't needed here
puneetlath commentedon Aug 2, 2023
Issue reporter: @dhanashree-sawant $250 (paid via Upwork)
Contributor: @kushu7 $1000 (paid via Upwork)
Contributor+: @eVoloshchak $1500 (to be NewDot)
@eVoloshchak can you please request payment on NewDot and then comment here once you have? Thanks!
kushu7 commentedon Aug 2, 2023
Hello @puneetlath , It seems a speed bonus may be applicable here, as the pull request was ready to merge within 2 daysbut you were OOO. I also experienced a similar case in the past: #20973 (comment)
puneetlath commentedon Aug 2, 2023
Ah yes, right you are. I'll amend.
kushu7 commentedon Aug 3, 2023
@puneetlath I have accepted new offer on upwork. 😇
eVoloshchak commentedon Aug 3, 2023
@puneetlath, thanks, requested the payment via NewDot🎉
JmillsExpensify commentedon Aug 3, 2023
Reviewed details for @eVoloshchak. These details are accurate based on summary from Business Reviewer and are now approved for payment in NewDot.
puneetlath commentedon Aug 3, 2023
Great, closing out. Thanks everyone!