Repository navigation
Distance - IOU report for changed details, title is not shown in LHN when user re-login #32111
Description
Activity
- addedDeployBlockerCashThis issue or pull request should block deploymentThis issue or pull request should block deployment
on Nov 28, 2023 github-actions commented
on Nov 28, 2023 on Nov 28, 2023 – with GitHub ActionsContributorMore actions👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
- Identify the pull request that introduced this issue and revert it.
- Find someone who can quickly fix the issue.
- Fix the issue yourself.
Triggered auto assignment to @danieldoglas (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.@kbecciv , can you confirm this is not happening in production?
This looks like a backend issue
When a user signs in,openAppAPI is called, but this API doesn't return transactions data. Transaction data is returned whenopenReportAPI is called and so some gap exists between themAs you can see below, we get report name of the transaction thread from the transaction
https://github.com/Expensify/App/blob/c03a541c909f3619390d6ead73c8df23cd964e62/src/libs/ReportUtils.ts#L1859C5-L1859C5That's why the transaction thread title appears a bit later
I think we need to return transactions data fromopenAppcall in order to solve this issueI agree it sounds like a backend issue. I think adding transactions to the OpenApp call is in progress in the backend right now, so I don't think this needs to be a deploy blocker for the app.
but my question remains, if this is not happening in production, it might mean that we had a change in our staging backend that caused this
@danieldoglas Issue is not reproduced on production
20231128_184214.mp4
Hm, this is very intersting. I couldn't find anything that was deployed in staging that could cause this.
@danieldoglas This problem is already known and will be fixed with #31302.
You can see this problem now because we make the title blank instead of a placeholder when the transaction is null or empty.@shubham1206agra I think those are different issues. Looks like this one specifically was caused by the TS migration that was deployed to staging yesterday with #29012.
I'm removing the deploy blocker on this for now
5 remaining items
@danieldoglas Checking
@danieldoglas Didn't find the root cause yet, but have some observations.
Firstly I think on dev there is some bug (?) where I cannot find any users to send distance money requestsearch-bug.mp4
Secondly I think my PR just show hidden bug by adding this
ifstatement which I think is related to bug reported hereLines 1858 to 1863 in 2f9ae2d
const transaction = TransactionUtils.getLinkedTransaction(reportAction); if (!isNotEmptyObject(transaction)) { return ''; } if (TransactionUtils.hasReceipt(transaction) && TransactionUtils.isReceiptBeingScanned(transaction)) { Here are two videos , one for current
mainand second from before merging ReportUtils migration1.mp4
2.mp4
My first guess is that at the begining before opening Report we dont have a data for transactions in Onyx
App/src/libs/TransactionUtils.ts
Lines 18 to 27 in 2f9ae2d
Onyx.connect({ key: ONYXKEYS.COLLECTION.TRANSACTION, waitForCollectionCallback: true, callback: (value) => { if (!value) { return; } allTransactions = Object.fromEntries(Object.entries(value).filter(([, transaction]) => !!transaction)); }, }); And before opening Report
allTransactionsare null and from here
https://github.com/Expensify/App/blob/2f9ae2d37354ce3335d16805d05c313ef3d25fa9/src/libs/TransactionUtils.ts#L389-L397C2we will always get
{}as a return value
so here
https://github.com/Expensify/App/blob/0a4985466fce930193290b38684f3c721db199be/src/libs/ReportUtils.ts#L1860C1-L1876
currently we will get''and previously we will get some not wanted value like0$ request.I can revert my change for returning
''but there will still be a bug. And I think @shubham1206agra was mentioning it earlier hereI understand the origin of the bug with the new check, and I think I agree that the real solution is to return the transaction.
We have a PR for that coming up next week, I think we can wait for it.
Reacted by Jakub ButkiewiczMoving this one to weekly while we wait for the backend pull request
I think this is now in staging. @kbecciv can you please test this?
Issue is not reproducible
hi.mp4
Great, closing this
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.4.0
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:
Expected Result:
When user log out and re-login again, the IOU report created for changes made by "set description" must be displayed with "title" in LHN.
Actual Result:
The IOU report created for changes made by "set description" is displayed with "title" in LHN but when user log out and re-login again, the IOU report is displayed "without title" in LHN.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6293007_1701170082729.use_this.mp4
View all open jobs on GitHub