Add isFromCreditCardImport to check the transaction from import card#77243
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
…d-field-for-personal-card-import
…d-field-for-personal-card-import
…d-field-for-personal-card-import
|
🚧 @mollfpr has triggered a test Expensify/App build. You can view the workflow run here. |
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Excited for this!
This comment has been minimized.
This comment has been minimized.
…d-field-for-personal-card-import
|
🚧 @mollfpr 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! 🧪🧪
|
|
@Ollyws Could you review the PR? Thank you! |
|
Reviewing today. |
|
@mollfpr Could you DM me the |
Reviewer Checklist
Screenshots/Videos |
|
@madmax330 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] |
| hasReservationList, | ||
| hasRoute as hasRouteTransactionUtils, | ||
| isManagedCardTransaction as isCardTransactionTransactionUtils, | ||
| isFromCreditCardImport as isCardTransactionTransactionUtils, |
There was a problem hiding this comment.
Is this unused? If it's used shouldn't we update it somewhere in this file?
There was a problem hiding this comment.
We only need to change isManagedCardTransaction to isFromCreditCardImport, because in the file we use isCardTransactionTransactionUtils. Both functions have the same params and the same purpose, but isFromCreditCardImport enhances to check imported transaction from personal card.
…d-field-for-personal-card-import
|
Conflict resolved! |
|
✋ 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/madmax330 in version: 9.2.88-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.2.88-7 🚀
|
| hasReservationList, | ||
| hasRoute as hasRouteTransactionUtils, | ||
| isManagedCardTransaction as isCardTransactionTransactionUtils, | ||
| isFromCreditCardImport as isCardTransactionTransactionUtils, |
There was a problem hiding this comment.
This change caused #81997. Replacing isManagedCardTransaction with isFromCreditCardImport (while keeping the alias isCardTransactionTransactionUtils) made the shouldShowReimbursable condition use a broader check that returns true for all card imports — including personal cards. This incorrectly hid the Reimbursable toggle for personal card transactions. The fix in #84596 uses the real isManagedCardTransaction specifically for shouldShowReimbursable, which only targets centrally managed cards.





Explanation of Change
Adding a new function to
isFromCreditCardImport, which we already have in the BE, to determine if the transaction is coming from an imported credit card or a managed card. Then use it to check for showing the card field.Fixed Issues
$ #77241
PROPOSAL:
Tests
Precondition:
expensidemo, and select any card. The reimbursable option can be leave on or offOffline tests
Precondition:
expensidemo, and select any card. The reimbursable option can be leave on or offQA Steps
Precondition:
expensidemo, and select any card. The reimbursable option can be leave on or offPR 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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2025-12-18.at.22.46.27.mp4