Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD #43040] [Xero Export] Implement offline pattern B for manual report exports #45137

Closed
lakchote opened this issue Jul 10, 2024 · 4 comments
Assignees

Comments

@lakchote
Copy link
Contributor

lakchote commented Jul 10, 2024

Main issue: https://github.com/Expensify/Expensify/issues/409245

Part of QBO Export and Error Handling in NewDot

Doc section: https://docs.google.com/document/d/1aQl-AK_F6IqszWYG2aEllTsD5x3h4b8Zu0XEG0LuQ08/edit#heading=h.xw0s9oqvo44s
Project: https://github.com/orgs/Expensify/projects/129

Feature Description

During review for the detailed design, we decided we should support offline pattern B when manually exporting reports here. To implement that we need to

  • Create an optimistic EXPORTINTEGRATION action in our Report.exportToIntegration and Report.markAsManuallyExported actions
    • The text should say started exporting this report to {integration}...
  • Pass the optimisticReportActionID to both Report_Export and MarkAsExported APIs
  • Use the ID to create the action in Auth
    • Auth will queue updates for the report action with the final text: exported this report to {integration}. [View out-of-pocket expenses].
  • On failure
    • create the INTEGRATIONSMESSAGE action with the error message like normal (using a different ID)
    • delete the optimistic action on the frontend using failureData

Manual Test Steps

Sucessful offline export

  1. Submit an expense report
  2. Log in as the workspace admin
  3. Approve the report
  4. Go offline
  5. 3-dot menu > Export > Xero
  6. Verify a semi-transparent exported action gets added to the report
  7. Go online
  8. Verify the action becomes fully opaque

Failed offline export

Prerequisites

  • Add a chart of account (expense category) to Xero that you can delete later

Steps

  1. Create a report with an expense
  2. Categorize the expense using the new Xero category
  3. Submit it
  4. Log in as the workspace admin and approve the report
  5. Log into Xero and delete the chart of account
  6. Go offline in NewDot
  7. Export the report to Xero (3-dot menu > Export > Xero)
    1. Verify a semi-transparent exported action gets added to the report
    1. Go online
  8. Verify
    • the exported action is removed
    • a report export error action is added in it's place

Automated Tests

  • Verify optimisticData for the INTEGRATIONSMESSAGE is merged for both Report.exportToIntegration and Report.markAsManuallyExported actions
  • Verify failureData removes the action
@lakchote lakchote self-assigned this Jul 10, 2024
@lakchote lakchote moved this to Release 2: Summer 2024 (Aug) in [#whatsnext] #wave-collect Jul 10, 2024
@lakchote lakchote changed the title [HOLD #44022] [Xero Export] Implement offline pattern B for manual report exports [HOLD #43040] [Xero Export] Implement offline pattern B for manual report exports Jul 15, 2024
@lakchote
Copy link
Contributor Author

Will be handled by #43040

@melvin-bot melvin-bot bot added the Overdue label Jul 23, 2024
@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Aug 7, 2024
Copy link

melvin-bot bot commented Aug 7, 2024

This issue has not been updated in over 15 days. @lakchote eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot removed the Overdue label Aug 7, 2024
@trjExpensify
Copy link
Contributor

@arosiclair can we close this btw, based on #45137 (comment)?

@arosiclair
Copy link
Contributor

Yeah I think this should also work for Xero now.

@github-project-automation github-project-automation bot moved this from Release 2: Summer 2024 (Aug) to Done in [#whatsnext] #wave-collect Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants