Skip to content

[HOLD for payment 2024-12-09] [$250] QBO - "Reconciliation account" disappears after selecting it #52548

Closed

Description

@IuliiaHerets

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.62-1
Reproducible in staging?: Y
Reproducible in production?: Y
Issue was found when executing this PR: #51359
Email or phone of affected tester (no customers):
Issue reported by: Applause Internal Team

Action Performed:

Preconditions:

  • Use a new Gmail account.
  • Expensify Card is enabled.
  • Bank account is added in Expensify Card page.
  • Workspace is connected to QBO.
  1. Open the app
  2. Navigate to Workspace settings - Accounting - Card reconciliation
  3. Enable "Continuous Reconciliation"
  4. Click on your added bank account

Expected Result:

"Reconciliation account" should still be visible.

Actual Result:

"Reconciliation account" disappears after selecting it.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6665023_1731579153679.QGOY0671.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021860984129964489529
  • Upwork Job ID: 1860984129964489529
  • Last Price Increase: 2024-11-25
  • Automatic offers:
    • DylanDylann | Reviewer | 105055923
    • daledah | Contributor | 105055925
Issue OwnerCurrent Issue Owner: @trjExpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 14, 2024
  2. melvin-bot commented on Nov 14, 2024

    @melvin-bot

    Triggered auto assignment to @trjExpensify (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.

  3. etCoderDysto commented on Nov 14, 2024

    @etCoderDysto
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-11-14 12:38:30 UTC.

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    QBO - "Reconciliation account" disappears after selecting it

    What is the root cause of that problem?

    When trying to add a bank account on step 4, the network request fails, and error message from onyx will be stored in cardSettings.errors, but we are not displaying the error message in CardReconciliationPage.

    cardSettings.errors

    const [cardSettings] = useOnyx(`${ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_SETTINGS}${workspaceAccountID}`);

    Onyx failure data

    const failureData: OnyxUpdate[] = [
    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_SETTINGS}${workspaceAccountID}`,
    value: {
    paymentBankAccountID: currentSettlementBankAccountID,
    isLoading: false,
    errors: ErrorUtils.getMicroSecondOnyxErrorWithTranslationKey('common.genericErrorMessage'),

    What changes do you think we should make in order to solve the problem?

    1. We should use ErrorMessageRow to display the error message below
    {cardSettings?.errors && <ErrorMessageRow errors={cardSettings?.errors} />}
    
    1. Create a utility function that clears error message errors field of ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_SETTINGS}${workspaceAccountID
    2. Pass the utility fucntion to onClose prop of ErrorMessageRow
    3. Change styles according to design

    Optionally, in failure data we can pass settlementBankAccountID to paymentBankAccountID to prevent the failed bank account from disappearing form Card reconciliation page, and change the bank to any available previous bank account by reseting paymentBankAccountID value to currentSettlementBankAccountID in the utility function

    What alternative solutions did you explore? (Optional)

    Result
    Screen.Recording.2024-11-14.at.3.36.48.in.the.afternoon.mp4
    Note we will fix the style
  4. daledah commented on Nov 15, 2024

    @daledah
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-11-15 09:37:35 UTC.

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Bug 1: "Reconciliation account" disappears after selecting it.
    Bug 2: Error message is not displayed when API is not called successfully.

    What is the root cause of that problem?

    Bug 1

    We still display the Continuous Reconciliation toggle even though users haven't set up settlement bank account

    Bug 2: Optional:

    • We don't have logic to display the error:

    {!!paymentBankAccountID && !!isContinuousReconciliationOn && (
    <MenuItemWithTopDescription
    style={styles.mt5}
    title={bankAccountTitle}
    description={translate('workspace.accounting.reconciliationAccount')}
    shouldShowRightIcon
    onPress={() => Navigation.navigate(ROUTES.WORKSPACE_ACCOUNTING_RECONCILIATION_ACCOUNT_SETTINGS.getRoute(policyID, connection))}
    />
    )}

    when API UpdateCardSettlementAccount encountered error.

    What changes do you think we should make in order to solve the problem?

    const configurationOptions = [

    We only should push cardReconciliation to configurationOptions if workspaceAccountID && areExpensifyCardEnabled

    If user go to Card reconciliation by deeplink I suggest displaying the not found page or display a locked toggle (also use this condition workspaceAccountID && areExpensifyCardEnabled)

    Additional we still can update the error handle if needed

    • We can display the error message in:

                            <MenuItemWithTopDescription errorText={errorText} ... />

    with errorText = Object.values(getLatestError(cardSettings?.errors)).at(0).

    The error message should be displayed in the MenuItemWithTopDescription because the error is related to paymentBankAccountID field.

    What alternative solutions did you explore? (Optional)

  5. trjExpensify commented on Nov 15, 2024

    @trjExpensify
    Contributor
  6. moved this to Bugs and Follow Up Issues in #expensify-bugson Nov 15, 2024
  7. allgandalf commented on Nov 15, 2024

    @allgandalf
    Contributor

    Think it has to do more with Accounting and less expensify cards (Implementation wise), but happy to take this one on!

  8. trjExpensify commented on Nov 15, 2024

    @trjExpensify
    Contributor

    Gotcha, continuousReconciliation is only a feature of the Expensify Card.

  9. DylanDylann commented on Nov 18, 2024

    @DylanDylann
    Contributor

    @trjExpensify I already worked on Card reconciliation account setting Page before (when implementing the Expensify Card). Let me take this issue

  10. DylanDylann commented on Nov 18, 2024

    @DylanDylann
    Contributor

    I agreed with @daledah about Bug 1, in case the user go to accounting page right after login successful we also need to display the bank account list

    About the main bug on OP, @daledah @etCoderDysto could anyone help to explain why the API failed?

  11. DylanDylann commented on Nov 18, 2024

    @DylanDylann
    Contributor

    @mountiny @MariaHCD Tag you here because it relates to the Expensify Card. In this issue, we have 2 problems:

    1. In case the user goes to the Card reconciliation page right after login is successful we also need to display the bank account list. To do that, private_expensifyCardSettings_ needs to be available when the user goes to the Card reconciliation Page. Currently, It is only available after we call API OpenPolicyExpensifyCardsPage (going to Expensify Card Page)

    2. To set settlementBankAccountID we have two ways:

    • In ExpensifyCard, we use ConfigureExpensifyCardsForPolicy API and It works well
    Screenshot 2024-11-18 at 12 01 58 Screenshot 2024-11-18 at 12 02 05
    • In the Card reconciliation page, we use UpdateCardSettlementAccount API and It is failed
    Screenshot 2024-11-18 at 12 01 34 Screenshot 2024-11-18 at 12 01 41

    TBH, I don't understand why UpdateCardSettlementAccount API is failed in this case and ConfigureExpensifyCardsForPolicy still be successful. Could you please help to take a look?

  12. 37 remaining items

  13. melvin-bot commented on Dec 2, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  14. melvin-bot commented on Dec 2, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.69-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2024-12-09. 🎊

    For reference, here are some details about the assignees on this issue:

  15. melvin-bot commented on Dec 2, 2024

    @melvin-bot

    @DylanDylann @trjExpensify @DylanDylann The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  16. moved this from Bugs and Follow Up Issues to Hold for Payment in #expensify-bugson Dec 3, 2024
  17. trjExpensify commented on Dec 9, 2024

    @trjExpensify
    Contributor

    👋 let's get the checklist in here, please. Thanks!

  18. DylanDylann commented on Dec 9, 2024

    @DylanDylann
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: This isn't a bug, it is a new implementation

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Preconditions:

    • Bank account is added in Expensify Card page.
    • Workspace is connected to QBO

    Test:

    1. Create a workspace
    2. Go to More features > Enable Workflows, Accounting & Expensify Card
    3. Go to Workflows > Make or track payments > add a VBBA
    4. Go to Accounting > Connect to QBO successfully
    5. Verify that "Card reconciliation" is not an option displayed (only Import, Export, Advanced).
    6. Copy this URL and paste it in the browser (Ex: settings/workspaces/{policyID}/accounting/quickbooks-online/card-reconcillation)
    7. Verify that you land on a Not found page
    8. Go to Expensify Card > Click Issue New Card > Select the linked bank account
    9. Go to Accounting
    10. Verify that the Card reconciliation option is displayed now.

    Do we agree 👍 or 👎

  19. trjExpensify commented on Dec 10, 2024

    @trjExpensify
    Contributor

    Thanks!

    Settle bank account on Expensify Card

    I'm not sure I understand this instruction. Settle the bank account? 😕

  20. DylanDylann commented on Dec 10, 2024

    @DylanDylann
    Contributor

    @trjExpensify It means selecting bank acocunt here

    Screenshot 2024-12-10 at 16 56 34
  21. trjExpensify commented on Dec 10, 2024

    @trjExpensify
    Contributor

    Gotcha, can we make sure the test makes sense for someone to follow? It sounds like you need to add a VBBA first for this test, right? Here's a suggested edit:

    1. Create a workspace
    2. Go to More features > Enable Workflows, Accounting & Expensify Card
    3. Go to Workflows > Make or track payments > add a VBBA
    4. Go to Accounting > Connect to QBO successfully
    5. Verify that "Card reconciliation" is not an option displayed (only Import, Export, Advanced).
    6. Copy this URL and paste it in the browser: (CC: @DylanDylann what's the URL?)
    7. Verify that you land on a Not found page
    8. Go to Expensify Card > Click Issue New Card > Select the linked bank account
    9. Go to Accounting
    10. Verify that the Card reconciliation option is displayed now.
  22. DylanDylann commented on Dec 10, 2024

    @DylanDylann
    Contributor

    @trjExpensify Thanks for your reminder. I already updated the test steps

  23. trjExpensify commented on Dec 10, 2024

    @trjExpensify
    Contributor

    Nice, thanks!

    Payment summary as follows:

    Paid, closing!

  24. moved this from Hold for Payment to Done in #expensify-bugson Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions