Repository navigation
Fix: Allow Locations as Tags when QBO export is Journal Entry + Debit Card - #83416
Conversation
|
@carlosmiceli 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] |
|
@neil-marcellini adding you for review here since you reviewed the original PR https://github.com/Expensify/Auth/pull/18400 |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
JmillsExpensify
left a comment
There was a problem hiding this comment.
Approve this change (e.g. tags for JE and Debit) for product.
|
Lint needs fixing. While you are at it, can you please remove the double negation? AI generated: The naming problem
Recommendation: flip the polarity and rename to the positive business concept Rename the function to something like function canImportLocationsAsTags(config?: QBOConnectionConfig): boolean {
return (
config?.reimbursableExpensesExportDestination === CONST.QUICKBOOKS_REIMBURSABLE_ACCOUNT_TYPE.JOURNAL_ENTRY &&
(config?.nonReimbursableExpensesExportDestination === CONST.QUICKBOOKS_NON_REIMBURSABLE_ACCOUNT_TYPE.CREDIT_CARD ||
config?.nonReimbursableExpensesExportDestination === CONST.QUICKBOOKS_NON_REIMBURSABLE_ACCOUNT_TYPE.DEBIT_CARD)
);
}Then the consuming code reads naturally without double negation: |
…sTags and flip polarity
bd9d328
|
Done! Renamed to |
|
🚧 @neil-marcellini 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! 🧪🧪
|
Compute canImportLocationsAsTags() outside the useMemo so the boolean result can be used as a primitive dependency, matching the pattern already used in the sibling QuickbooksLocationsPage.tsx. This avoids depending on the entire qboConfig object and fixes both the react-hooks/exhaustive-deps and react-hooks/preserve-manual-memoization warnings introduced in #83416. Made-with: Cursor
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.3.27-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.27-8 🚀
|
|
BugZero follow-up for #83788 A regression was found after #83416/#74581 around the QBO Locations/Vendor bill interaction. #83416 correctly kept the Tags option unavailable for Vendor bill because QBO bills can't carry per-line-item locations, but the related company-card export picker still treated any enabled location import as a reason to hide Vendor bill. That was too broad: locations imported as Report fields should keep Vendor bill available; only locations imported as Tags should hide it. #91717 fixed the picker to use the restricted |
Explanation of Change
The locations import restriction check (
shouldShowLocationsLineItemsRestriction) only allowed Tags when the QBO non-reimbursable export was set to Credit Card. Debit Card was missed, so users with Journal Entry + Debit Card exports couldn't see the Tag option for Locations.Also deduplicates the condition in
QuickbooksLocationsDisplayedAsPage.tsxby using the shared utility instead of an inline check.Fixed Issues
$ #74581
Tests
Offline tests
N/A — this is a config display change with no network dependency.
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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.Screen.Recording.2026-02-25.at.10.09.47.AM.mov