fix: Amount section inconsistency when merging CSV-imported card expenses#84509
Conversation
…rted from CSV file
|
@linhvovan29546 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] |
|
@MarioExpensify 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] |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
I agree, the search snapshot is adding |
|
@luacmartins or @JS00001 might be good to help you on that Q above. |
|
|
|
@luacmartins Thanks! I was just asking to understand why we don’t have
Currently, we don’t need |
JmillsExpensify
left a comment
There was a problem hiding this comment.
Product approved, per the discussion in the linked issue.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-03-11.at.21.37.45.movAndroid: mWeb ChromeScreen.Recording.2026-03-11.at.21.38.48.moviOS: HybridAppScreen.Recording.2026-03-11.at.21.35.48.moviOS: mWeb SafariScreen.Recording.2026-03-11.at.21.33.32.movMacOS: Chrome / SafariScreen.Recording.2026-03-11.at.21.31.10.mov |
linhvovan29546
left a comment
There was a problem hiding this comment.
@TaduJR Could you please write unit tests for isFromCreditCardImport?
…-Card-expense-can-be-merged-with-card-expense-when-imported-from-CSV-file
Done @linhvovan29546 |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @MarioExpensify 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/MarioExpensify in version: 9.3.36-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.3.36-10 🚀
|
Explanation of Change
The
isFromCreditCardImport()function checks whether a transaction is a card import. CSV-imported card transactions havebank === 'upload', which should returnfalse(they are intentionally allowed to merge). However, the search snapshot addstransactionType: 'card'to these transactions, and thetransactionType === CARDcheck was evaluated first, returningtrueinstead. This caused the Amount field on the "Select details" page to be auto-resolved and hidden, rather than shown as a conflict for the user to choose.The fix moves the
bank === UPLOADcheck before thetransactionType === CARDcheck, ensuring consistent behavior regardless of whether the transaction data comes from Onyx or the search snapshot.Fixed Issues
$ #81167
PROPOSAL: #81167 (comment)
Tests
Precondition: User has imported card transactions from CSV file.
Offline tests
Same as tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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))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
Android-Native.mp4
Android: mWeb Chrome
Android-mWeb.mp4
iOS: Native
iOS-Native.mp4
iOS: mWeb Safari
iOS-Safari.mp4
MacOS: Chrome / Safari
Mac-Chrome.mp4