Select attendee options when merging two expenses#70478
Conversation
|
@dominictb 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] |
|
🚧 @garrettmknight 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, Desktop, and Web. Happy testing! 🧪🧪
|
| const isTransactionScanning = isScanning(updatedTransaction ?? transaction); | ||
| const hasRoute = hasRouteTransactionUtils(transactionBackup ?? transaction, isDistanceRequest); | ||
|
|
||
| const actualAttendees = isFromMergeTransaction && updatedTransaction ? updatedTransaction.comment?.attendees : transactionAttendees; |
There was a problem hiding this comment.
Ideally we shouldn't always apply ternary check here for merge-able fields, the MoneyRequestView is supposed to display the only transaction details that it receives. But as we have this cleanup ticket #69564 which will refactor the MoneyRequestView that way, we can temporarily work around like this for now. @hoangzinh Can you confirm?
There was a problem hiding this comment.
Also can't we just simply do a fallback like this?
const actualAttendees = updatedTransaction?.comment?.attendees ?? transactionAttendees;There was a problem hiding this comment.
But as we have this cleanup ticket #69564 which will refactor the MoneyRequestView that way, we can temporarily work around like this for now.
You're right. Btw, I worry it will break "Duplicate transaction" flow if we're going that way. Do you think it's safe if we go with your approach?
| } | ||
|
|
||
| if (field === 'attendees') { | ||
| const targetAttendeeLogins = ((targetValue as Attendee[] | undefined)?.map((attendee) => attendee.login ?? attendee.email) ?? []).sort(localeCompare); |
There was a problem hiding this comment.
Should this be like this as I see login is an optional filed?
| const targetAttendeeLogins = ((targetValue as Attendee[] | undefined)?.map((attendee) => attendee.login ?? attendee.email) ?? []).sort(localeCompare); | |
| const targetAttendeeLogins = ((targetValue as Attendee[] | undefined)?.map((attendee) => attendee.email ?? attendee.login) ?? []).sort(localeCompare); |
There was a problem hiding this comment.
I prefer login to support phone number login cases, and I found that we also use login in displaying attendees
App/src/libs/TransactionUtils/index.ts
Line 843 in 6c0ce0a
Co-authored-by: Dominic <165644294+dominictb@users.noreply.github.com>
Hi @garrettmknight @youssef-lr, which option do you guys prefer in this case? |
|
Let's go with |
|
@dominictb PR is ready to review again |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariScreen.Recording.2025-09-28.at.22.55.21-compressed.movMacOS: Chrome / SafariScreen.Recording.2025-09-28.at.22.42.49-compressed.movMacOS: Desktop |
|
@hoangzinh we have conflicts 🙏 |
|
@youssef-lr I resolved conflicts |
|
cc @youssef-lr your turn |
|
🚀 Deployed to staging by https://github.com/youssef-lr in version: 9.2.22-1 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.2.22-6 🚀
|




Explanation of Change
Fixed Issues
$ #68447
PROPOSAL:
Tests
Same as QA
Offline tests
Same as QA
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Precondition:
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))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
Screen.Recording.2025-09-17.at.06.55.59.android.mov
Android: mWeb Chrome
Screen.Recording.2025-09-17.at.06.43.20.android.chrome.mov
iOS: Native
Screen.Recording.2025-09-17.at.07.11.43.mov
iOS: mWeb Safari
Screen.Recording.2025-09-17.at.07.07.41.mov
MacOS: Chrome / Safari
Screen.Recording.2025-09-17.at.06.00.02.web.mov
MacOS: Desktop
Screen.Recording.2025-09-17.at.07.00.16.desktop.mov