Skip to content

[HOLD for payment 2024-08-29] [QBO Export] [$250] Display QBO auto-sync errors and RBRs in NewDot #44016

@arosiclair

Description

@arosiclair

Part of QBO Export and Error Handling in NewDot

Main issue: https://github.com/Expensify/Expensify/issues/350150
Doc section: https://docs.google.com/document/d/1aQl-AK_F6IqszWYG2aEllTsD5x3h4b8Zu0XEG0LuQ08/edit#heading=h.pmmx5zp5s75j
Project: #wave-collect

Feature Description

As described in the doc, we need to display a RBR when there are errors in a policy connection’s last sync.

The RBR will show on the path to the integration connection settings (Avatar > Workspaces > [Workspace name] > Accounting > Connections):

  • LHN Avatar: check if policy.connection.lastSync.isSuccessful is false in the Indicator
  • InitialSettingsPage: add the same check to hasGlobalWorkspaceSettingsRBR
  • WorkspaceInitialPage: add the same check to the connections menu item here
  • PolicyAccountingPage: use policy.connection.lastSync.errorMessage to populate the errorText option for the QBO menu item here

When the error is a credentials error (policy.connection.lastSync.isAuthenticationError is true), we’ll replace the ‘Sync now’ option in the connection’s 3-dot menu with a ‘Reconnect’ option here. The option will restart the Quickbooks Auth flow as described in our initial QBO doc.

Manual Test Steps

Prerequisites

  • Collect workspace with an admin and member
  • Setup QBO integration connection

Steps

  1. Log into QBO and disconnect the Expensify app (Menu > Apps > Overview > Expensify 3-dot menu > Disconnect)
  2. Log into NewDot as the admin
  3. Verify there's a RBR on the path: Avatar > Workspaces > [Workspace name] > Accounting > QBO
  4. Verify a red error message appears on the connection explaining the issue
  5. Select QBO’s 3-dot menu
  6. Verify there’s a “Enter credentials” option
  7. Select “Enter credentials”
  8. Verify a new window opens to log into QBO

Automated Tests

  • Add a test to IS verifying errorMessage and isAuthenticationError are set on the IntegrationLastSync
  • Add an Auth test for SavePolicy verifying that an INTEGRATIONSMESSAGE action gets posted to the #admins room when the last sync is a failure
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01cc92666d46e99569
  • Upwork Job ID: 1803462924011290436
  • Last Price Increase: 2024-06-19
Issue OwnerCurrent Issue Owner: @muttmuure

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2ExternalAdded to denote the issue can be worked on by a contributorNewFeatureSomething to build that is a new item.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions