Remove getReportTransactions callers' reliance on the deprecated default (Part 1) - #99633
Conversation
getReportTransactions() falls back to a deprecated global when the allReportsTransactions param is omitted. Migrate the first two callers outside ReportUtils.ts and mark the function @deprecated so future callers don't reintroduce the implicit fallback while the rest of the migration is in progress.
…ecation Marking getReportTransactions @deprecated flags every existing reference to it, not just new bare calls, so CI failed with 46 pre-existing violations across files not yet migrated. Grandfather them via the seatbelt baseline (scoped to @typescript-eslint/no-deprecated/getReportTransactions only) so CI passes while still blocking any new violation of this rule going forward.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
JmillsExpensify
left a comment
There was a problem hiding this comment.
No product review required.
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-09-03.at.18.00.09.mov |
|
@linhvovan29546 Could you resolve conflict? |
…-getReportTransactions-p1 # Conflicts: # config/eslint/eslint.seatbelt.tsv # tests/unit/OptionsListUtilsTest.tsx
…tils The main merge introduced a new call site in this file that trips the no-deprecated rule now that getReportTransactions is marked @deprecated.
|
🚧 Valforte has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ 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/Valforte in version: 9.4.70-0 🚀
|
|
🤖 No help site changes are required for this PR. This is an internal refactor with no user-facing behavior change, so nothing under WhyAll four changed files are internal:
There are no copy, label, button, screen, or flow changes. Your own test plan confirms the intent: "Verify that the merge expense flow works the same as in production." I checked the article that covers this flow — How to Merge Expenses — and it documents the user-facing steps and the merged-expense result. None of that changes here. @linhvovan29546, please confirm this PR introduces no user-facing behavior change. If any part of the merge flow does look different to a user, reply with |
|
Deploy Blocker #100351 was identified to be related to this PR. |
|
🚀 Deployed to staging by https://github.com/Valforte in version: 9.4.72-0 🚀
|
🤖 Help site review: no changes requiredNo updates are needed to This PR is an internal refactor with no user-facing behavior change:
Nothing changes in the merge flow a member sees. Your own test plan confirms this: the merge works the same as production, and the multi-expense navigation is unchanged. There is no new or renamed feature, tab, setting, button, or copy string for the help site to document. I checked the article that covers this flow, How to Merge Duplicate Expenses. Its steps, eligibility rules, and "What happens after you merge duplicate expenses" section all remain accurate as written. Since no docs change is needed, there is no help site PR to review. If you think a specific article is wrong or missing something here, reply with what it should say and I'll open the draft PR. @linhvovan29546, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
Remove getReportTransactions callers' reliance on the deprecated default (Part 1).
getReportTransactions()falls back to a deprecated global when theallReportsTransactionsparam is omitted. This PR migrates the first two callers outsideReportUtils.tsand marks the function@deprecatedso future callers don't reintroduce the implicit fallback while the rest of the migration is in progress.Explanation of Change
getReportTransactions()inReportUtils.tsfalls back to a deprecated global (deprecatedReportsTransactions) whenever itsallReportsTransactionsparameter is omitted. This is part 1 of migrating external callers off that implicit default:DynamicConfirmationPage.tsxnow reuses theuseReportTransactionsCollectionresult it already fetches for the samereportID, instead of making a separate baregetReportTransactionscall that relies on the deprecated global.OptionsListUtilsTest.tsxnow builds the expected transaction list directly from the transaction the test already created, instead of relying on the deprecated global being populated via Onyx.getReportTransactionsis now marked@deprecated, with a note that it will be removed once every caller passesallReportsTransactionsexplicitly, so other in-flight PRs don't add new bare calls to it while the rest of the migration is in progress.Fixed Issues
$ #66418
PROPOSAL: N/A
Tests
Create a report with exactly one expense.
Open the expense → Merge expenses, select an eligible expense from a different report, and proceed to the confirmation page.
Tap Merge expenses to confirm.
Verify that the merge expense flow works the same as in production.
Repeat the steps starting with a report containing 2+ expenses. Confirm that the normal navigation behavior remains unchanged and there is no regression for the multi-expense case.
Verify that no errors appear in the JS console
Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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
telegram-cloud-document-5-6089154003747224618.mp4
Android: mWeb Chrome
telegram-cloud-document-5-6089154003747224621.mp4
iOS: Native
Screen.Recording.2026-08-27.at.16.00.03.mov
iOS: mWeb Safari
Screen.Recording.2026-08-27.at.14.56.15.mov
MacOS: Chrome / Safari
Screen.Recording.2026-08-27.at.14.44.40.mov