Repository navigation
[NoQA] Filter duplicate money-preview card on legacy SendMoney IOU report - #93556
Conversation
…cy-sendmoney-phantom-iou-card
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
JmillsExpensify
left a comment
There was a problem hiding this comment.
No product review required.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
🚧 @deetergp has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/deetergp in version: 9.4.16-1 🚀
Bundle Size Analysis (Sentry): |
|
🤖 No help site changes required. This PR is an internal bug fix in It changes rendering/display logic only — it doesn't introduce or modify any user-facing feature, workflow, setting, tab, button, or copy. The fix simply restores the already-expected behavior (no duplicate card), which is what the help site already implies for paying/sending money flows (Pay-Expenses.md, Pay-an-invoice.md). Nothing documented in I reviewed |
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.4.16-5 🚀
|
Explanation of Change
When viewing a legacy SendMoney transaction (pre-October 2023), the IOU report shows a duplicate "$X expense" card next to the original SendMoney card.
Root cause: Auth's SendMoney command didn't include
IOUTransactionIDat the top of the pay action's message until October 2023. So any SendMoney pay action created before that lives on the IOU report without that field, regardless ofpaymentType(Wallet, Elsewhere, PayPal, etc.).When the user opens the transaction, the client calls
OpenReportto load the transaction thread. The server lookup filters IOU actions bymessage->>'$.IOUTransactionID', which misses the legacy action. Auth then falls into theneedsTransactionThreadbranch and synthesizes a brand new IOUtype=createaction on the settled IOU report. That fresh action renders as the duplicate card.The App's existing
type=createfilter ingetCombinedReportActionswould normally hide that synthesized action, but it's skipped when the report has a SendMoney pay action (theisSentMoneyReportbypass at the top of the function). That's the gap this PR closes.A matching Auth-side fix is coming in a separate PR to stop the synthesis at the source.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/635465
PROPOSAL:
Tests
N/A
Offline tests
N/A
QA Steps
NoQA, the bug only reproduces on pre-Oct-2023 SendMoney data, which can't be created via the NewDot flow. Staging verification will be coordinated with Sara on her affected legacy report.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Before

After
