Closed kbecciv closed 1 year ago
Triggered auto assignment to @puneetlath (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are β
)App does not remove dot from amount in split bill after first try
https://github.com/Expensify/App/blob/d98a02a5d227c4503e3e3d05c7a3029431d51145/src/pages/iou/steps/MoneyRequestAmountPage.js#L150-L159
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.
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.
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,
},
}
})
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 (External
)
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.
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 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 .
this.setState({amount: parseFloat(this.state.amount).toString()})
We also have to set the selection state according to the updated amount.
https://github.com/Expensify/App/assets/75031127/c1fe14c8-a70e-4dd0-9b93-286b7577e927
App does not remove dot from amount in split bill after first try
When we navigate to navigateToNextPage
we should parse it again to convert into string and set the right cursor position
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π§ The proposals are quite similar, I think we should proceed with @kushu7's proposal since that was the first proposal to identify the root cause and propose a fix
πππ C+ reviewed! cc: @puneetlath
π£ @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 Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
π£ @dhanashree! π£ Hey, it seems we donβt have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
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?
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.44-2 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-08-01. :confetti_ball:
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) 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!
Contributor: @kushu7 $1000 (paid via Upwork)
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: https://github.com/Expensify/App/issues/20973#issuecomment-1626711336
Ah yes, right you are. I'll amend.
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
https://github.com/Expensify/App/assets/93399543/f220ef96-2558-4285-84cc-fef1a247ff95
https://github.com/Expensify/App/assets/93399543/57570bcb-223d-42b6-904c-b777d728fc87
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