Fix legacy unreported expenses missing "Move to report" option in NewDot#95068
Conversation
…nreported-expenses-move-to-report
…nreported-expenses-move-to-report
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec65af7229
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
@bernhardoj 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] |
|
@shubham1206agra 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] |
|
Ohh no Melvin pulls 2 C+ 😓 Let's go with @bernhardoj since they got assigned first. 🙏 |
| return true; | ||
| } | ||
|
|
||
| function canUnreportedPerDiemBeMoved(transaction: OnyxEntry<Transaction>, policies: OnyxCollection<Policy>): boolean { |
There was a problem hiding this comment.
I think we should rename this to canUnreportedBeMoved or something similar because the logic inside the function isn't limited to per diem.
The function assumes the transaction is a per diem, but inside it, we check first whether it's per diem or not.
There was a problem hiding this comment.
Nice suggestion! Updated!
|
@mollfpr I've imported the Discover Bank card, but I don't see any imported expenses.
|
|
@bernhardoj Could you try again, delete the previous, and add an import by selecting the new account? Also, attach the |
…nreported-expenses-move-to-report
…sReport" This reverts commit d17a4fb.
|
@mollfpr Still not showing. Where do I get the Oh, here you go: "a15a5f2c2a42fd95-SJC" |
…nreported-expenses-move-to-report
|
@bernhardoj It seems the import is gated by the staging flag. Could you try again against the BE prod? Also try to use this account |
…nreported-expenses-move-to-report
|
@bernhardoj I tested on production, and it's still not showing the "Move to report". Screen.Recording.Jul.9.2026.mp4You should not open the expense, or it will create an IOU action, and the |
…nreported-expenses-move-to-report
|
Ok, yeah, I can reproduce it now (I'm pretty sure didn't open the expense on ND, I open it on OD tho to unreport the expense) |
Reviewer Checklist
Screenshots/Videos |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 lakchote 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/lakchote in version: 9.4.33-0 🚀
|
|
🤖 Help site review: no docs changes required. This PR is a bug fix that restores existing, already-documented behavior. It adds an early-return path in The help site already describes this behavior correctly:
Because the fix simply makes actual behavior match what the docs already say (rather than changing documented behavior), there is nothing to update under @mollfpr, please confirm you agree that no help site changes are required here. If you feel the docs should be expanded to call out that imported/legacy unreported expenses can also be moved to a report, let me know and I'll open a draft PR. |
|
@bernhardoj @mollfpr @trjExpensify We are unable to use Discover test credentials to QA this PR as no expenses match required criteria. Is there an alternative way? 95068.mp4 |
|
@mvtglobally it seems the export got gated by staging, could you try setup the expenses in OldDot production? |
|
@mollfpr Fail with the original KI in this way. 95068_prod.mp4 |
|
@IuliiaHerets okay the import is works, now open the NewDot in staging to test the "Move to report" option with the same account. |
|
@mollfpr Pass in Staging with the same account for Web 95068_pass.mp4 |







Explanation of Change
Legacy or imported unreported expenses don't have an IOU report action because they predate the NewDot money-request flow. In
canEditFieldOfMoneyRequest, theREPORTfield eligibility check bails out early at theisMoneyRequestAction(reportAction)guard before reaching the existing logic that allows unreported expenses to be moved. This caused "Move to report" to never appear in Search's bulk actions for these expenses.The fix adds an early-return path before that guard: if the field being edited is
REPORT, there is noreportAction, and the transaction is unreported, we skip the action guard entirely and return the result of the per-diem policy check — the same check already used for regular unreported expenses. I also extracted that per-diem check into acanUnreportedPerDiemBeMovedhelper to avoid duplicating the logic.Fixed Issues
$ #93799
PROPOSAL:
Tests
Prerequisite:
expensidemocredentialsnoneOffline tests
N/A
QA Steps
Prerequisite:
expensidemocredentialsnonePR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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
MacOS: Chrome / Safari
Screen.Recording.Jul.2.2026.mp4