-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[HOLD for payment 2023-08-01] [$1000] Web - App does not remove dot from amount in split bill after first try #22361
Comments
Triggered auto assignment to @puneetlath ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease 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 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 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 App/src/pages/iou/steps/MoneyRequestAmountPage.js Lines 401 to 405 in d98a02a
we can add this here on Line 404 this.setState((prevState)=>{
const amountAsString = CurrencyUtils.convertToWholeUnit(prevState.selectedCurrencyCode, amountInSmallestCurrencyUnits).toString() || ''
return {
amount:amountAsString,
selection: {
start: amountAsString.length,
end: amountAsString.length,
},
}
}) VideoUntitled.movWhat alternative solutions did you explore? (Optional)None |
Job added to Upwork: https://www.upwork.com/jobs/~01516b47bd364f3b33 |
Current assignee @puneetlath is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.What is the root cause of that problem?
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: parseFloat("11.").toString() === "11"
parseFloat("11.1").toString() === "11.1" inside this.setState({amount: parseFloat(this.state.amount).toString()}) We also have to set the selection state according to the updated amount. Screen.Recording.2023-07-07.at.7.10.21.AM.movWhat alternative solutions did you explore? (Optional) |
ProposalPlease 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 const amountAsString = Number(this.state.amount).toString()
this.setState({
amount: amountAsString,
selection: {
start: amountAsString.length,
end: amountAsString.length,
},
});``` |
@manjesh-yadav i proposed parsing and converting to string above |
Reviewing proposals today |
That is an interesting bug🧐 🎀👀🎀 C+ reviewed! |
📣 @eVoloshchak Please request via NewDot manual requests for the Reviewer role ($1000) |
📣 @eVoloshchak 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @kushu7 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Upwork job |
📣 @dhanashree! 📣
|
The BZ member will need to manually hire dhanashree for the Reporter role. Please store your Upwork details and apply to our Upwork job so this process is automatic in the future! |
@eVoloshchak PR is ready for review. cc @puneetlath |
@puneetlath, @eVoloshchak, @kushu7 Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@kbecciv, @puneetlath is OOO, is there a way we can reassign an engineer to review the PR? Or should we just put this on hold? |
|
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:
|
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 friendly reminder about the checklist ahead of next week. |
|
Issue reporter: @dhanashree-sawant $250 (paid via Upwork) @eVoloshchak can you please request payment on NewDot and then comment here once you have? Thanks! |
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) |
Ah yes, right you are. I'll amend. |
@puneetlath I have accepted new offer on upwork. 😇 |
@puneetlath, thanks, requested the payment via NewDot🎉 |
Reviewed details for @eVoloshchak. These details are accurate based on summary from Business Reviewer and are now approved for payment in NewDot. |
Great, closing out. Thanks everyone! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
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?
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
dot.is.not.removed.from.the.amount.mov
Recording.3461.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688631197920759
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: