Added filename to receipt structure - #70667
Conversation
|
@ikevin127 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] |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2025-09-16.at.17.54.16.mov |
|
NAB: 🟡 Clean code and reusability (in preparation for Part 2 of PR) Note: The fallback read ( 🔄 We will have two authoritative sources for filename though ( export function getReceiptFilenameFromTransaction(transaction: Transaction | Partial<Transaction>): string | undefined {
// Use ||, not ?? since we want empty string to fallback to the legacy transaction.filename
return transaction?.receipt?.filename || transaction?.filename;
}Why this matters |
| taxAmount, | ||
| billable, | ||
| reimbursable: true, | ||
| filename, |
There was a problem hiding this comment.
I think this one needs to stay for now until all the readers are updated, otherwise, I think all the references to transaction.filename are going to break.
There was a problem hiding this comment.
@tgolen It's not going to break as we have logic inside buildOptimisticTransaction to extract the correct filename value from receipt object.
| taxAmount, | ||
| billable, | ||
| reimbursable: true, | ||
| filename, |
|
✋ 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/tgolen in version: 9.2.16-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.2.16-14 🚀
|
Explanation of Change
Fixed Issues
$ #69484
Tests
Offline 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))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
Screen.Recording.2025-09-16.at.11.12.50.PM.mov
Android: mWeb Chrome
Screen.Recording.2025-09-16.at.9.47.42.PM.mov
iOS: Native
iOS: mWeb Safari
Screen.Recording.2025-09-16.at.9.43.00.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2025-09-16.at.8.50.29.PM.mov
MacOS: Desktop
Screen.Recording.2025-09-16.at.10.05.56.PM.mov