-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$500] [Distance] - Incorrect Amount after updating distance rate #27051
Comments
ProposalPlease re-state the problem that we are trying to solve in this issue.[Distance] Incorrect Amount after updating distance rate What is the root cause of that problem?We only calculate when the amount is 0 and the request is distance. So when we edit the waypoint again, the amount is not recalculated
What changes do you think we should make in order to solve the problem?We should always calculate the amount when the distance is changed by changing the check here to
What alternative solutions did you explore? (Optional)Whenever we edit the waypoint we will reset the amount to |
Triggered auto assignment to @anmurali ( |
Job added to Upwork: https://www.upwork.com/jobs/~013f2b0dfe92fa39b6 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to @JmillsExpensify ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Updating distance rate in other tab isn't update the earlier calculated amount What is the root cause of that problem?Currently, we are only calculating the amount when the current iou amount is 0 which kind of gets calculated the first time only.
What changes do you think we should make in order to solve the problem?We need to consider the recalculation for 2 cases
To recalculate we need to take out the iou amount condition and keep only Note: I actually provided the solution recalculation in one of the other issue here(I am not sure whether it considers or not) regarding the waypoint but posting here again with the explanation of the mileage part too. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Incorrect Amount after updating distance rate What is the root cause of that problem?
We only calculate the amount if the props.iouAmount === 0. So when the rate is changed, we don't re-calculate the amount What changes do you think we should make in order to solve the problem?I think props.iouAmount === 0 condition is added to reduce the redundant computation. App/src/components/MoneyRequestConfirmationList.js Lines 173 to 188 in b11bddc
we should remove the shouldCalculateDistanceAmount variable and to avoid redundant re-calculate we can create a new variable called amount in a useMemo and use it instead of calling getDistanceRequestAmount function this is demo code change
What alternative solutions did you explore? (Optional) |
@JmillsExpensify, @Ollyws, @anmurali Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Will review proposals asap. |
I think this is dupe of #26946 |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@JmillsExpensify, @Ollyws, @anmurali Huh... This is 4 days overdue. Who can take care of this? |
@JmillsExpensify, @Ollyws, @anmurali 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
@JmillsExpensify, @Ollyws, @anmurali Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it! |
@JmillsExpensify @Ollyws @anmurali this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@JmillsExpensify, @Ollyws, @anmurali 12 days overdue. Walking. Toward. The. Light... |
Closing this as a dupe of #26946 |
@anmurali I reported it first |
@anmurali Bump on this one |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
The amount should be recalculated after updating the distance rate
Actual Result:
Incorrect Amount
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.66.3
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
wrong-amount.mp4
Recording.4343.mp4
Expensify/Expensify Issue URL:
Issue reported by: @hichamcc
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693858446228419
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: