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
[$500] Web - IOU - TBD shows up for preview component after uploading picture as receipt and deleting it #33935
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Version Number: 1.4.21-1 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:
Open a conversation
Click on plus icon inside composer
Click on request money > Scan receipt
Upload a picture which is not a receipt
Finish the IOU flow and wait for the scan to finish
After the scan finished and an error shows up go inside the IOU details page and delete the request
Go back to the report
Expected Result:
TBD should not show as the preview component for the iou
Actual Result:
The IOU preview component turns to TBD
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Web - IOU - TBD shows up for preview component after uploading picture as receipt and deleting it[/-][+][$500] Web - IOU - TBD shows up for preview component after uploading picture as receipt and deleting it[/+]on Jan 4, 2024
Please re-state the problem that we are trying to solve in this issue.
When the IOU Report contains only removed requests, the total is shown as TBD.
What is the root cause of that problem?
When calculating whether to show TBD on the IOU Report view, we use the hasOnlyDistanceRequestTransactions function. It returns true if the transactions list is empty, which is incorrect:
In our case, the transactions list is empty because when removing a failed scan request, we remove the transactions, but not the transaction threads (since they contain in-thread message from __fake__ (or notifications) account about the failed scan).
What changes do you think we should make in order to solve the problem?
Modify the hasOnlyDistanceRequestTransactions function to return false if there are no transactions (it was broken during the TS migration):
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Activity
melvin-bot commentedon Jan 4, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01c149adeb2e7da69f
[-]Web - IOU - TBD shows up for preview component after uploading picture as receipt and deleting it[/-][+][$500] Web - IOU - TBD shows up for preview component after uploading picture as receipt and deleting it[/+]melvin-bot commentedon Jan 4, 2024
Triggered auto assignment to @NicMendonca (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jan 4, 2024
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Jan 4, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws (
External)paultsimura commentedon Jan 4, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
When the IOU Report contains only removed requests, the total is shown as TBD.
What is the root cause of that problem?
When calculating whether to show TBD on the IOU Report view, we use the
hasOnlyDistanceRequestTransactionsfunction. It returnstrueif the transactions list is empty, which is incorrect:App/src/libs/ReportUtils.ts
Lines 980 to 987 in 3b424bb
App/src/components/ReportActionItem/MoneyReportView.tsx
Line 37 in fab5110
App/src/libs/CurrencyUtils.ts
Lines 102 to 105 in 2f78afd
In our case, the transactions list is empty because when removing a failed scan request, we remove the transactions, but not the transaction threads (since they contain in-thread message from
__fake__(or notifications) account about the failed scan).What changes do you think we should make in order to solve the problem?
Modify the
hasOnlyDistanceRequestTransactionsfunction to returnfalseif there are no transactions (it was broken during the TS migration):Result:
What alternative solutions did you explore? (Optional)
rojiphil commentedon Jan 4, 2024
This issue is been addressed in this PR
We can either put this on hold or close this
cc @fedirjh
fedirjh commentedon Jan 4, 2024
Agree with @rojiphil , this should be fixed with #32698.
NicMendonca commentedon Jan 4, 2024
thanks both! closing for now