You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-12-09] [$250] QBO - "Reconciliation account" disappears after selecting it #52548
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.
Open the app
Navigate to Workspace settings - Accounting - Card reconciliation
Enable "Continuous Reconciliation"
Click on your added bank account
Expected Result:
"Reconciliation account" should still be visible.
Actual Result:
"Reconciliation account" disappears after selecting it.
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.
Create a utility function that clears error message errors field of ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_SETTINGS}${workspaceAccountID
Pass the utility fucntion to onClose prop of ErrorMessageRow
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
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
@mountiny@MariaHCD Tag you here because it relates to the Expensify Card. In this issue, we have 2 problems:
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)
To set settlementBankAccountID we have two ways:
In ExpensifyCard, we use ConfigureExpensifyCardsForPolicy API and It works well
In the Card reconciliation page, we use UpdateCardSettlementAccount API and It is failed
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?
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:
@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]
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:
Create a workspace
Go to More features > Enable Workflows, Accounting & Expensify Card
Go to Workflows > Make or track payments > add a VBBA
Go to Accounting > Connect to QBO successfully
Verify that "Card reconciliation" is not an option displayed (only Import, Export, Advanced).
Copy this URL and paste it in the browser (Ex: settings/workspaces/{policyID}/accounting/quickbooks-online/card-reconcillation)
Verify that you land on a Not found page
Go to Expensify Card > Click Issue New Card > Select the linked bank account
Go to Accounting
Verify that the Card reconciliation option is displayed now.
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:
Create a workspace
Go to More features > Enable Workflows, Accounting & Expensify Card
Go to Workflows > Make or track payments > add a VBBA
Go to Accounting > Connect to QBO successfully
Verify that "Card reconciliation" is not an option displayed (only Import, Export, Advanced).
Copy this URL and paste it in the browser: (CC: @DylanDylann what's the URL?)
Verify that you land on a Not found page
Go to Expensify Card > Click Issue New Card > Select the linked bank account
Go to Accounting
Verify that the Card reconciliation option is displayed now.
Activity
melvin-bot commentedon Nov 14, 2024
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.etCoderDysto commentedon Nov 14, 2024
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 inCardReconciliationPage.cardSettings.errorsApp/src/pages/workspace/accounting/reconciliation/CardReconciliationPage.tsx
Line 35 in 512ae9f
Onyx failure data
App/src/libs/actions/Card.ts
Lines 357 to 364 in 512ae9f
What changes do you think we should make in order to solve the problem?
ErrorMessageRowto display the error message belowApp/src/pages/workspace/accounting/reconciliation/CardReconciliationPage.tsx
Line 96 in 512ae9f
ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_SETTINGS}${workspaceAccountIDonCloseprop ofErrorMessageRowOptionally, in failure data we can pass
settlementBankAccountIDtopaymentBankAccountIDto prevent the failed bank account from disappearing formCard reconciliationpage, and change the bank to any available previous bank account by resetingpaymentBankAccountIDvalue tocurrentSettlementBankAccountIDin the utility functionWhat alternative solutions did you explore? (Optional)
Result
Screen.Recording.2024-11-14.at.3.36.48.in.the.afternoon.mp4
daledah commentedon Nov 15, 2024
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:
App/src/pages/workspace/accounting/reconciliation/CardReconciliationPage.tsx
Lines 109 to 117 in a6f1348
when API
UpdateCardSettlementAccountencountered error.What changes do you think we should make in order to solve the problem?
App/src/pages/workspace/accounting/PolicyAccountingPage.tsx
Line 288 in 5f483dc
We only should push cardReconciliation to configurationOptions if
workspaceAccountID && areExpensifyCardEnabledIf 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
App/src/pages/workspace/accounting/reconciliation/CardReconciliationPage.tsx
Line 110 in a6f1348
with
errorText = Object.values(getLatestError(cardSettings?.errors)).at(0).The error message should be displayed in the
MenuItemWithTopDescriptionbecause the error is related topaymentBankAccountIDfield.What alternative solutions did you explore? (Optional)
trjExpensify commentedon Nov 15, 2024
Another one for your eyes @mountiny @MariaHCD @madmax330 @nkuoch @allgandalf @DylanDylann
allgandalf commentedon Nov 15, 2024
Think it has to do more with
Accountingand less expensify cards (Implementation wise), but happy to take this one on!trjExpensify commentedon Nov 15, 2024
Gotcha, continuousReconciliation is only a feature of the Expensify Card.
DylanDylann commentedon Nov 18, 2024
@trjExpensify I already worked on Card reconciliation account setting Page before (when implementing the Expensify Card). Let me take this issue
DylanDylann commentedon Nov 18, 2024
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?
DylanDylann commentedon Nov 18, 2024
@mountiny @MariaHCD Tag you here because it relates to the Expensify Card. In this issue, we have 2 problems:
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)To set settlementBankAccountID we have two ways:
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?
37 remaining items
melvin-bot commentedon Dec 2, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Dec 2, 2024
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:
melvin-bot commentedon Dec 2, 2024
@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]
trjExpensify commentedon Dec 9, 2024
👋 let's get the checklist in here, please. Thanks!
DylanDylann commentedon Dec 9, 2024
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[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:
Test:
Do we agree 👍 or 👎
trjExpensify commentedon Dec 10, 2024
Thanks!
I'm not sure I understand this instruction. Settle the bank account? 😕
DylanDylann commentedon Dec 10, 2024
@trjExpensify It means selecting bank acocunt here
trjExpensify commentedon Dec 10, 2024
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:
Workflows,Accounting&Expensify CardImport,Export,Advanced).Not found pageIssue New Card> Select the linked bank accountCard reconciliationoption is displayed now.DylanDylann commentedon Dec 10, 2024
@trjExpensify Thanks for your reminder. I already updated the test steps
trjExpensify commentedon Dec 10, 2024
Nice, thanks!
Payment summary as follows:
Paid, closing!