Fix unreported expense export payload - #93163
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
We're seeing some unexpected side effects from the backend change so it's going to be temporarily reverted while we look into it a bit more. Will update here when it's live again |
@NikkiWines NP, Please ping me here when its back so we can proceed here. |
|
Backend changes have been deployed again |
|
@KJ21-ENG we're getting more requests come in about this. Can you prioritise getting this out of draft today, please? Thanks! |
|
@trjExpensify Yaa Sure, Since this is done, I will recheck that front end changes are aligned with it and will make PR ready for review. Thanks! |
|
@gijoe0295 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] |
|
@KJ21-ENG Can you fill the checklist and add recordings for all platforms? For |
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-06-17.at.19.12.18.movAndroid: mWeb ChromeScreen.Recording.2026-06-17.at.19.13.15.moviOS: HybridAppScreen.Recording.2026-06-17.at.19.04.32.moviOS: mWeb SafariScreen.Recording.2026-06-17.at.19.06.49.movMacOS: Chrome / SafariScreen.Recording.2026-06-17.at.18.56.10.movScreen.Recording.2026-06-17.at.18.55.06.mov |
@gijoe0295 Yep, already on it. My original recordings got corrupted, so I'm re-doing them now and will update the PR shortly. Apologies for the delay—the upload must have failed without me realizing it until your comment. |
|
The PR body has been updated. Please accept my sincere apologies. I use a personal tool to compress all recordings under 10 MB before uploading them to issues or PRs, but it unfortunately failed this time, which is why the body wasn't updated in time. I know this is a priority, and I will make sure to avoid these errors in the future. Thanks! |
|
🚧 @Gonals 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/Gonals in version: 9.4.10-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help site review: no documentation changes required. I reviewed the changes in this PR against the help site articles under Conclusion: No draft docs PR is needed. Why: This PR is an internal bug fix in the bulk-export payload logic (
There is no user-facing behavior change to document: no new feature, no renamed/added UI labels, tabs, settings, or buttons, and no change to the documented export flow itself. The existing export functionality is unchanged from the user's perspective — this fix simply makes the unreported-expense export work correctly. The relevant export-related articles (e.g., @KJ21-ENG, no linked help site PR was created since no documentation updates are required. If you believe a user-facing concept here should be documented, let me know and I'll draft one. |
|
🚀 Deployed to staging by https://github.com/Gonals in version: 9.4.12-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help site review — no docs changes required. I reviewed the changes in this PR against the help articles under Why: This is an internal bug fix, not a user-facing behavior or feature change. The diff is a 2-line change in
The user-facing flow (Spend > Expenses, select rows, Export > All Data - expense level) is unchanged — the fix just makes it work correctly for unreported and mixed selections. None of the help articles document this sentinel-ID payload behavior or the local empty-report error, so there's nothing to add or correct. Since no documentation changes are required, I have not created a draft PR. @KJ21-ENG, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
🚀 Deployed to staging by https://github.com/Gonals in version: 9.4.14-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.4.14-1 🚀
|
Explanation of Change
This updates the Spend bulk export flow so selected unreported expenses can be exported through All Data - expense level without sending frontend sentinel report IDs as real report IDs.
Specifically, this PR:
CONST.REPORT.UNREPORTED_REPORT_IDandCONST.REPORT.TRASH_REPORT_IDout ofselectedTransactionReportIDs, soQueueExportSearchWithTemplatereceivesreportIDList: []for all-unreported selections and only real report IDs for mixed selections.REPORT_0, is not treated as an empty report. Real reports that exist withtransactionCount === 0still trigger the empty-report flow.Fixed Issues
$ #91930
PROPOSAL: #91930 (comment)
Tests
npm run web.You can't export empty report.Offline tests
npm run web.QA Steps
You can't export empty 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
Android: Native
Record_2026-06-17-17-56-58_40d2c9e2d8fb5b5aba3904834590021e.mp4
Android: mWeb Chrome
Record_2026-06-17-17-35-14.mp4
iOS: Native
Screen.Recording.2026-06-17.at.6.16.48.PM.mov
iOS: mWeb Safari
ezyZip.48.mp4
MacOS: Chrome / Safari
ezyZip.32.mp4