[$250] QBD-Sync status message is not displayed and the last sync time is not updated
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: v9.2.28-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-1219/folder/13176907/41237422/941906845 Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team Device used: Windows 11/ Chrome App Component: Workspace Settings
Action Performed:
Precondition: Have a workspace with QBD connected.
- Go to staging.new.expensify.com
- Log in as workspace admin
- Go to workspace settings > Accounting > Export > Export Date > select any option (can be any change in Export or Advanced settings)
- Wait until the integration syncs
Expected Result:
The sync status message is displayed, and the last sync time is updated to "Last synced less than a minute ago".
Actual Result:
The sync status message is not displayed, and the last sync time is not updated.
Workaround:
Unknown
Platforms:
- [ ] Android: App
- [ ] Android: mWeb Chrome
- [ ] iOS: App
- [ ] iOS: mWeb Safari
- [ ] iOS: mWeb Chrome
- [x] Windows: Chrome
- [x] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
https://github.com/user-attachments/assets/a57a04af-da9b-4b29-a9e5-65e067552b04
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022001497172943248753
- Upwork Job ID: 2001497172943248753
- Last Price Increase: 2025-12-25
Issue Owner
Current Issue Owner: @Krishna2323
Triggered auto assignment to @strepanier03 (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
@strepanier03 Still overdue 6 days?! Let's take care of this!
I don't have QBD connected to be able to test this. I'll see if there's any way I can set this up on a mac, but I'm not confident I'll be able to.
Posted in #bug-zero to see if anyone could help out with testing. If there's no one I'll set to needs repro.
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989
@strepanier03 Whoops! This issue is 2 days overdue. Let's get this updated quick!
Waiting for reproduction.
@strepanier03 Huh... This is 4 days overdue. Who can take care of this?
Reproduction needed still.
@strepanier03 Huh... This is 4 days overdue. Who can take care of this?
This is still waiting for someone to be able to reproduce this. I can't test it and no C+ have posted yet.
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989
@strepanier03 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
Not reproducible so far. Setting to weekly until picked up.
Hello @strepanier03 QA team found similar issue using below steps using latest build v9.2.58-2 in Android and iOS.
Steps : Precondition: User has connected QBO in workspace
- Open Expensify app
- Tap on "Workspaces" tab and tap on workspace which is connected to QBO
- Tap on "Accounting"
- Tap on "Import"
- Tap on "Locations"
- Tap on toggle button to import locations
https://github.com/user-attachments/assets/0ad6f3ae-f0fd-4b91-837c-3193dff947e8
Should we create new issue in this case ? or this is could be same root cause with issue ?
Hmmm, I think we should make a new issue unless it's reproducible on all direct accounting package connections.
Oops, meant to put this weekly last week.
I'm going to close this and we can reopen if it becomes reproducible again.
Re-opening because the issue is still reproducible.
https://github.com/user-attachments/assets/73199fda-b72b-45e0-847b-8dcf7d32c692
I'm going to set this to weekly since it's still reproducible. I just haven't been able to reproduce it myself, I can't connect to QBD.
Job added to Upwork: https://www.upwork.com/jobs/~022001497172943248753
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Krishna2323 (External)
⚠️ This issue has had its price increased by 4x or more. Please review the issue and ensure the price is correct.
Upwork job price has been updated to $250
Proposal
Please re-state the problem that we are trying to solve in this issue.
The QBD sync status message is not displayed and the last sync time is not updated after making changes to Export or Advanced settings in the QuickBooks Desktop integration.
Steps to Reproduce:
- Have a workspace with QBD connected
- Go to staging.new.expensify.com
- Log in as workspace admin
- Go to workspace settings > Accounting > Export > Export Date > select any option (or make any change in Export or Advanced settings)
- Wait until the integration syncs
Expected Result:
- The sync status message is displayed during the sync
- The last sync time is updated to "Last synced less than a minute ago" after successful sync
Actual Result:
- The sync status message is not displayed
- The last sync time is not updated
What is the root cause of that problem?
The root cause is that the getAccountingIntegrationData function in utils.tsx is missing the pendingFields and errorFields properties for the QuickBooks Desktop (QBD) integration.
Here's the flow of the issue:
-
When a user changes an Export or Advanced setting for QBD, the action functions in QuickbooksDesktop.ts (e.g.,
updateQuickbooksDesktopExportDate) usebuildOnyxDataForQuickbooksExportConfigurationto create optimistic Onyx updates that setpendingFieldson the config. -
The
PolicyAccountingPagecomponent usesgetAccountingIntegrationDatato retrieve integration data, includingpendingFieldsanderrorFields, which are then passed to determine:- Whether pending actions should be displayed via
settingsPendingAction() - Whether error indicators should be shown via
areSettingsInErrorFields()
- Whether pending actions should be displayed via
-
The sync status is determined in PolicyAccountingPage.tsx at lines 336-348, where it checks if settings have pending actions and displays the appropriate sync message.
-
However, the QBD case in
getAccountingIntegrationData(lines 276-311) does not returnpendingFieldsanderrorFields, unlike all other integrations (QBO, Xero, NetSuite, Sage Intacct). -
Without these fields being passed through, the UI cannot detect that settings have pending changes, so:
- No sync status message is displayed
- The last sync time doesn't update properly
- The pending actions and sync progress aren't tracked in the interface
All other accounting integrations correctly include these properties:
-
QBO :
pendingFields: {...qboConfig?.pendingFields, ...policy?.connections?.quickbooksOnline?.config?.pendingFields} -
Xero:
pendingFields: policy?.connections?.xero?.config?.pendingFields -
NetSuite:
pendingFields: {...netsuiteConfig?.pendingFields, ...} -
Sage Intacct:
pendingFields: policy?.connections?.intacct?.config?.pendingFields - QBD: Missing these properties
What changes do you think we should make in order to solve the problem?
We should add the missing pendingFields and errorFields properties to the QBD integration data object returned by getAccountingIntegrationData.
Changes needed:
File: utils.tsx
Add the following two lines at the end of the QBD case return statement (after line 309, before the closing }):
pendingFields: policy?.connections?.quickbooksDesktop?.config?.pendingFields,
errorFields: policy?.connections?.quickbooksDesktop?.config?.errorFields,
Complete fix:
case CONST.POLICY.CONNECTIONS.NAME.QBD:
return {
title: translate('workspace.accounting.qbd'),
icon: expensifyIcons?.QBDSquare,
setupConnectionFlow: (
<ConnectToQuickbooksDesktopFlow
policyID={policyID}
key={key}
/>
),
onImportPagePress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_DESKTOP_IMPORT.getRoute(policyID)),
onExportPagePress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_DESKTOP_EXPORT.getRoute(policyID)),
onCardReconciliationPagePress: () => Navigation.navigate(ROUTES.WORKSPACE_ACCOUNTING_CARD_RECONCILIATION.getRoute(policyID, CONST.POLICY.CONNECTIONS.ROUTE.QBD)),
onAdvancedPagePress: () => Navigation.navigate(ROUTES.WORKSPACE_ACCOUNTING_QUICKBOOKS_DESKTOP_ADVANCED.getRoute(policyID)),
subscribedImportSettings: [
CONST.QUICKBOOKS_DESKTOP_CONFIG.ENABLE_NEW_CATEGORIES,
CONST.QUICKBOOKS_DESKTOP_CONFIG.MAPPINGS.CLASSES,
CONST.QUICKBOOKS_DESKTOP_CONFIG.MAPPINGS.CUSTOMERS,
CONST.QUICKBOOKS_DESKTOP_CONFIG.IMPORT_ITEMS,
],
subscribedExportSettings: [
CONST.QUICKBOOKS_DESKTOP_CONFIG.EXPORT_DATE,
CONST.QUICKBOOKS_DESKTOP_CONFIG.EXPORTER,
CONST.QUICKBOOKS_DESKTOP_CONFIG.REIMBURSABLE,
CONST.QUICKBOOKS_DESKTOP_CONFIG.REIMBURSABLE_ACCOUNT,
CONST.QUICKBOOKS_DESKTOP_CONFIG.MARK_CHECKS_TO_BE_PRINTED,
CONST.QUICKBOOKS_DESKTOP_CONFIG.NON_REIMBURSABLE,
CONST.QUICKBOOKS_DESKTOP_CONFIG.NON_REIMBURSABLE_ACCOUNT,
CONST.QUICKBOOKS_DESKTOP_CONFIG.NON_REIMBURSABLE_BILL_DEFAULT_VENDOR,
CONST.QUICKBOOKS_DESKTOP_CONFIG.SHOULD_AUTO_CREATE_VENDOR,
],
subscribedAdvancedSettings: [CONST.QUICKBOOKS_DESKTOP_CONFIG.SHOULD_AUTO_CREATE_VENDOR, CONST.QUICKBOOKS_DESKTOP_CONFIG.AUTO_SYNC],
workspaceUpgradeNavigationDetails: {
integrationAlias: CONST.UPGRADE_FEATURE_INTRO_MAPPING.quickbooksDesktop.alias,
backToAfterWorkspaceUpgradeRoute: getBackToAfterWorkspaceUpgradeRouteForQBD(),
},
pendingFields: policy?.connections?.quickbooksDesktop?.config?.pendingFields,
errorFields: policy?.connections?.quickbooksDesktop?.config?.errorFields,
};
This change ensures that:
- When QBD settings are updated, the pending state is properly tracked through
pendingFields - The sync status message is displayed when sync is triggered
- The last sync time is updated after successful synchronization
- Error states are properly displayed through
errorFields - QBD behaves consistently with all other accounting integrations
What alternative solutions did you explore?
None The proposed solution is the simplest, most maintainable fix that aligns QBD with the established patterns used by all other accounting integrations in the codebase.
@Krishna2323 Huh... This is 4 days overdue. Who can take care of this?
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@Krishna2323 Still overdue 6 days?! Let's take care of this!
I was not able to reproduce this one, will try again with these steps. Thanks for waiting.
@Krishna2323 Huh... This is 4 days overdue. Who can take care of this?