Stop re-sending receipts when moving tracked expenses - #97105
Conversation
…esend-on-tracked-expense-move-rebuild-final-gate-order
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@Beamanator 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 854ace1df7
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
PR doesn’t need product input as a refactor PR. Unassigning and unsubscribing myself. |
| */ | ||
| function hasUploadedReceipt(transaction: OnyxEntry<OnyxTypes.Transaction>): boolean { | ||
| const receipt = transaction?.receipt; | ||
| return !!receipt?.receiptID || (!!receipt?.source && !isLocalFile(receipt.source)); |
There was a problem hiding this comment.
Why can't we only do return !!receipt?.receiptID;?
There was a problem hiding this comment.
You're right, I checked in Auth and receiptID is always set whenever source is, so the source check is just insurance against a possible future drop in that pairing. I'll simplify to return !!receipt?.receiptID
|
friendly bump @flodnv - note that I'll be OOO for 2 weeks next week, so if we can get it merged this week, that'd be perfect! |
Explanation of Change
Moving a tracked expense re-uploaded a receipt that was already stored server-side, causing the web POST to take multiple seconds for large receipts. The move payload now checks the original transaction's receiptID or remote source before attaching receipt.
Fixed Issues
https://github.com/Expensify/Expensify/issues/663919
PROPOSAL:
Tests
receiptfield once the original transaction has a receiptID or remote receipt source.Screen.Recording.2026-07-28.at.15.29.57.mov
Offline tests
NA
QA Steps
receiptfield once the original transaction has a receiptID or remote receipt source.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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