[CP Staging] Fix mistake, use receipt name if receipt source#47117
[CP Staging] Fix mistake, use receipt name if receipt source#47117
Conversation
|
@allroundexperts 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] |
| pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, | ||
| receipt: receipt?.source ? {source: receipt.source, state: receipt.state ?? CONST.IOU.RECEIPT_STATE.SCANREADY} : {}, | ||
| filename: (receipt?.source ?? receipt?.name ?? filename).toString(), | ||
| filename: (receipt?.source ? receipt?.name ?? filename : filename).toString(), |
There was a problem hiding this comment.
Don't we need to also check receipt?.name in the first part of the ternary?
There was a problem hiding this comment.
Oh, if there's no receipt.name it would use the filename though.
There was a problem hiding this comment.
I think in the title it says use receipt name if receipt source. So I think it uses receipt.name if receipt.source exists and receipt.name exists. Otherwise, it falls back on filename. Is that right @neil-marcellini?
There was a problem hiding this comment.
Maybe it would be easier to read if it's written as:
(receipt?.source && receipt?.name) ? receipt?.name : filename
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
(cherry picked from commit 2f1b593)
|
🚀 Deployed to staging by https://github.com/francoisl in version: 9.0.18-7 🚀
|
Details
Fixed Issues
$ #47050
PROPOSAL: #47050 (comment)
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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
I only tested on web since the change is simple and platform independent.
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-08-08.at.3.15.32.PM.mov
MacOS: Desktop