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 2024-02-19] [$500] Distance - Receipt shows original amount and distance instead of TBD when editing distance offline #33362
Version Number: v1.4.14-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 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
Action Performed:
Precondition: There is a distance expense request in the workspace chat.
Navigate to the workspace chat from the precondition.
Open the distance request details page.
Click on the receipt.
Close the receipt.
Go offline.
Click Distance.
Add a stop and save it.
Click on the receipt.
Expected Result:
The amount and distance will show TBD.
Actual Result:
The amount and distance are not showing TBD. The values are still showing the original value before edit.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Distance - Receipt shows original amount and distance instead of TBD when editing distance offline[/-][+][$500] Distance - Receipt shows original amount and distance instead of TBD when editing distance offline[/+]on Dec 20, 2023
What alternative solutions did you explore? (Optional)
Instead of using transaction.isLoading, we can use the hasPendingWaypoints approach, but it was already discussed in a couple of places that we should move towards using transaction.isLoading instead of checking for pending waypoints, as it can be more dynamically controlled in one single place instead of later modifying the hasPendingWaypoints check in every single place where we use the TBD.
This transaction.isLoading is being set in one single place when modifying the transaction, so it should be relied on as the source of truth for the distance transaction being in pending status:
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.39-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this 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:
[@parasharrajat] The PR that introduced the bug has been identified. Link to the PR:
[@parasharrajat] 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:
[@parasharrajat] 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:
[@parasharrajat] Determine if we should create a regression test for this bug.
[@parasharrajat] 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.
[@kevinksullivan] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
I think the issue is eligible for a bonus due to the scope change on the PR. @paultsimura did great job in handling and managing the discussion till the end.
Activity
[-]Distance - Receipt shows original amount and distance instead of TBD when editing distance offline[/-][+][$500] Distance - Receipt shows original amount and distance instead of TBD when editing distance offline[/+]melvin-bot commentedon Dec 20, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01d635e8deae97ab55
melvin-bot commentedon Dec 20, 2023
Triggered auto assignment to @kevinksullivan (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Dec 20, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Dec 20, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (
External)dukenv0307 commentedon Dec 20, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
The amount and distance are not showing TBD. The values are still showing the original value before edit.
What is the root cause of that problem?
We don't use the same condition to show TDB as we do in
MoneyRequestView. The same for merchantApp/src/components/DistanceEReceipt.js
Line 38 in 249096e
App/src/components/ReportActionItem/MoneyRequestView.js
Lines 108 to 110 in 249096e
What changes do you think we should make in order to solve the problem?
We should use the same condition to show the amount and merchant as we do in
MoneyRequestViewhereApp/src/components/DistanceEReceipt.js
Line 38 in 249096e
App/src/components/ReportActionItem/MoneyRequestView.js
Lines 108 to 110 in 249096e
What alternative solutions did you explore? (Optional)
NA
paultsimura commentedon Dec 20, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Amount and Distance are not replaced with TBD in the eReceipt.
What is the root cause of that problem?
We currently show TBD only if the request has no initial amount:
App/src/components/DistanceEReceipt.js
Line 38 in fa87f8b
What changes do you think we should make in order to solve the problem?
We should add a check for
transaction.isLoading, and show TBD in this case as well:And use this
formattedMerchantinstead oftransactionMerchanthere:App/src/components/DistanceEReceipt.js
Line 77 in fa87f8b
What alternative solutions did you explore? (Optional)
Instead of using
transaction.isLoading, we can use thehasPendingWaypointsapproach, but it was already discussed in a couple of places that we should move towards usingtransaction.isLoadinginstead of checking for pending waypoints, as it can be more dynamically controlled in one single place instead of later modifying thehasPendingWaypointscheck in every single place where we use the TBD.This
transaction.isLoadingis being set in one single place when modifying the transaction, so it should be relied on as the source of truth for the distance transaction being inpendingstatus:App/src/libs/actions/IOU.js
Lines 936 to 946 in 249096e
kevinksullivan commentedon Dec 22, 2023
Hi @parasharrajat please review the proposal!
parasharrajat commentedon Dec 22, 2023
Checking this in 2 hours.
46 remaining items
melvin-bot commentedon Feb 12, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Feb 12, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.39-8 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 2024-02-19. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Feb 12, 2024
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:
melvin-bot commentedon Feb 20, 2024
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
paultsimura commentedon Feb 20, 2024
False alert – I used this issue as a reference.
parasharrajat commentedon Feb 20, 2024
I think the issue is eligible for a bonus due to the scope change on the PR. @paultsimura did great job in handling and managing the discussion till the end.
melvin-bot commentedon Feb 21, 2024
@amyevans, @paultsimura, @kevinksullivan, @parasharrajat Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
kevinksullivan commentedon Feb 22, 2024
Payment summary:
parasharrajat commentedon May 13, 2024
Payment requested as per #33362 (comment)
JmillsExpensify commentedon May 19, 2024
$500 approved for @parasharrajat