Remove SearchTransaction > isFromOneTransactionReport - #75484
luacmartins merged 15 commits into
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
heyjennahay
left a comment
There was a problem hiding this comment.
No concern with product change
| convertedAmount: item.convertedAmount, | ||
| currency: item.currency, | ||
| isFromOneTransactionReport: item.isFromOneTransactionReport, | ||
| isFromOneTransactionReport: item.report?.transactionCount === 1, |
There was a problem hiding this comment.
NAB: We can recreate a sharable util to check if a report is isOneTransactionReport
| const reportActions = allReportActions?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report?.reportID}`] ?? ([] as ReportAction[]); | ||
| const chatReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${report?.chatReportID}`]; | ||
| return !!getOneTransactionThreadReportID(report, chatReport, reportActions); | ||
| return report?.transactionCount === 1; |
There was a problem hiding this comment.
I wasn't aware of this existing function before. Uhmm, if we touch this function, we probably need to optimistically update transactionCount on adding/deleting/moving transactions to support offline mode.
There was a problem hiding this comment.
You are right. I have added back the original function as a deprecated function and kept its use in that file. New usage should use the new function and handle the optimistic data accordingly.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-11-26.at.22.41.33.android.movAndroid: mWeb ChromeScreen.Recording.2025-11-26.at.22.28.01.android.chrome.moviOS: HybridAppScreen.Recording.2025-11-26.at.22.48.36.moviOS: mWeb SafariScreen.Recording.2025-11-26.at.22.43.21.ios.safari.movMacOS: Chrome / SafariScreen.Recording.2025-11-26.at.22.25.56.web.mov |
|
🎯 @hoangzinh, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #76152. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.2.67-0 🚀
|
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.2.70-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.2.70-0 🚀
|
Explanation of Change
Fixed Issues
#73971
PROPOSAL:
Tests
SubmitOffline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop