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

[$250] QBO UK - Menu in "Export out-of-pocket expenses as" is blank before the connection syncs #45202

Closed
1 of 6 tasks
lanitochka17 opened this issue Jul 10, 2024 · 56 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 10, 2024

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.6-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4706870
Issue reported by: Applause - Internal Team

Action Performed:

Precondition
QBO UK connection is established in the workspace
The connection is not synced yet

  1. Navigate to workspace settings > Accounting
  2. Click on Export >Export out-of-pocket expenses as
  3. Observe the second menu in the setting

Expected Result:

The item field in the setting is not empty and has the title of "Accounts payable"

Actual Result:

The second item which is "Accounts payable" only appears when syncing is complete and is blank before syncing

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6538186_1720633386267.2024-07-10_20_07_43.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010b2c93b291a15c58
  • Upwork Job ID: 1811856308645344493
  • Last Price Increase: 2024-08-08
Issue OwnerCurrent Issue Owner: @abekkala
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 10, 2024
Copy link

melvin-bot bot commented Jul 10, 2024

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

@lanitochka17
Copy link
Author

@abekkala FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@Krishna2323
Copy link
Contributor

Krishna2323 commented Jul 10, 2024

Proposal

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

QBO UK - Menu in "Export out-of-pocket expenses as" is blank before the connection syncs

What is the root cause of that problem?

No fallback value is provided to title prop.

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

Add a fallback value or hide the MenuItem with OfflineWithFeedback when reimbursableExpensesAccount?.name is not present.

What alternative solutions did you explore? (Optional)

@cretadn22
Copy link
Contributor

Proposal

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

Menu in "Export out-of-pocket expenses as" is blank before the connection syncs

What is the root cause of that problem?

title={reimbursableExpensesAccount?.name}
description={accountDescription}

Normally, when the title field is blank, the description field is shown instead (similar to "export as" in the menuItem above).

However, in this scenario, both the title and description fields are empty.

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

Even if the title field is empty, the description field should not be left blank

we should include a default description like "account" or "bank account" if reimbursableExpensesExportDestination is undefined

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Jul 12, 2024
@abekkala abekkala added the External Added to denote the issue can be worked on by a contributor label Jul 12, 2024
Copy link

melvin-bot bot commented Jul 12, 2024

Job added to Upwork: https://www.upwork.com/jobs/~010b2c93b291a15c58

@melvin-bot melvin-bot bot changed the title QBO UK - Menu in "Export out-of-pocket expenses as" is blank before the connection syncs [$250] QBO UK - Menu in "Export out-of-pocket expenses as" is blank before the connection syncs Jul 12, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 12, 2024
Copy link

melvin-bot bot commented Jul 12, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (External)

@melvin-bot melvin-bot bot removed the Overdue label Jul 12, 2024
@tienifr
Copy link
Contributor

tienifr commented Jul 13, 2024

Proposal

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

  • The second item which is "Accounts payable" only appears when syncing is complete and is blank before syncing

What is the root cause of that problem?

  • This MenuItemWithTopDescription:

    <OfflineWithFeedback pendingAction={pendingFields?.reimbursableExpensesAccount}>
    <MenuItemWithTopDescription
    title={reimbursableExpensesAccount?.name}
    description={accountDescription}
    onPress={() => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_EXPORT_OUT_OF_POCKET_EXPENSES_ACCOUNT_SELECT.getRoute(policyID))}
    brickRoadIndicator={errorFields?.exportAccount ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined}
    shouldShowRightIcon
    errorText={errorFields?.exportAccount ? translate('common.genericErrorMessage') : undefined}
    />
    </OfflineWithFeedback>

    depend on the reimbursableExpensesExportDestination data:

  • By default, the reimbursableExpensesExportDestination is CONST.QUICKBOOKS_REIMBURSABLE_ACCOUNT_TYPE.VENDOR_BILL. But maybe BE does not set it when connecting QBO. This issue is reported in here.

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

  • We should hide this if reimbursableExpensesExportDestination is undefined.

  • Then we should display the not found page in settings/workspaces/${policyID}/accounting/quickbooks-online/export/out-of-pocket-expense/account-select if reimbursableExpensesExportDestination is undefined:

<FullPageNotFoundView shouldShow={!reimbursableExpensesExportDestination}><AccountSelectPage /></FullPageNotFoundView>

What alternative solutions did you explore? (Optional)

@tienifr

This comment was marked as outdated.

1 similar comment
@tienifr
Copy link
Contributor

tienifr commented Jul 13, 2024

Proposal updated

Copy link

melvin-bot bot commented Jul 16, 2024

@abekkala, @sobitneupane Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Jul 16, 2024
@sobitneupane
Copy link
Contributor

I could not reproduce the issue. Is there any specific steps to reproduce the issue?

@melvin-bot melvin-bot bot removed the Overdue label Jul 17, 2024
@tienifr
Copy link
Contributor

tienifr commented Jul 17, 2024

@sobitneupane Can you share a video from your side?

@sobitneupane
Copy link
Contributor

I just added QBO account and tested the issue.

The connection is not synced yet

How can I achieve the connection is not synced yet state?

@tienifr
Copy link
Contributor

tienifr commented Jul 17, 2024

  • @sobitneupane Can you try with new Expensify account? Here is from my side:
Screen.Recording.2024-07-17.at.16.58.13.mov

@abekkala
Copy link
Contributor

@sobitneupane can you address the above from @tienifr

@melvin-bot melvin-bot bot added the Overdue label Jul 19, 2024
Copy link

melvin-bot bot commented Jul 19, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@sobitneupane
Copy link
Contributor

Thanks for the proposals.

Proposal from @tienifr looks good.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Aug 8, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@mvtglobally
Copy link

Issue is reproducible during KI retests, when you go to "Export >Export out-of-pocket expenses as" before QBO sync

1722760941817.2024-08-04_13-37-56.mp4

@mvtglobally mvtglobally removed the retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause label Aug 9, 2024
@trjExpensify
Copy link
Contributor

Issue is reproducible during KI retests, when you go to "Export >Export out-of-pocket expenses as" before QBO sync

Ah, so yeah.. it hasn't finished the sync yet to display the data. I think we have a solution with that for other integrations to not show the import, export, card rec, advanced rows until the connection has been established or something? CC: @Expensify/design

@dannymcclain
Copy link
Contributor

Yeah I'm pretty sure we decided to wait to show all that stuff until the connection has finished syncing for the first time.

Example from NetSuite design doc:
image

@trjExpensify
Copy link
Contributor

Okay cool, so I think we could use this issue to implement that? I suspect that's frontend, but maybe @aldo-expensify can confirm.

@aldo-expensify
Copy link
Contributor

I'm not sure of what type of solution was implemented to have that, do we know who worked on that?

@trjExpensify
Copy link
Contributor

@hungvu193 @rushatgabhane @mananjadhav might know!

@hungvu193
Copy link
Contributor

I didn't implement that logic but I think we're using the same logic for all 4 connections so far:

...(isEmptyObject(policy?.connections) || shouldHideConfigurationOptions ? [] : configurationOptions),

@trjExpensify
Copy link
Contributor

Ah, that's helpful. Following the blame it was @mananjadhav, I believe.

@melvin-bot melvin-bot bot added the Overdue label Aug 14, 2024
@trjExpensify
Copy link
Contributor

So @aldo-expensify @hungvu193 @mananjadhav can this be external then?

@aldo-expensify
Copy link
Contributor

I'm a bit confused because the code @hungvu193 pointed out is supposed to apply to all types of connections, so that can't be what fixed the problem for other connections, or can it be?

@trjExpensify
Copy link
Contributor

Good question, I don't know. @mananjadhav would be great for you to chime in here, please. Thanks!

@abekkala
Copy link
Contributor

@mananjadhav can you review this please and provide your input?

@melvin-bot melvin-bot bot removed the Overdue label Aug 20, 2024
@yuwenmemon yuwenmemon self-assigned this Aug 20, 2024
@mananjadhav
Copy link
Collaborator

Sorry this didn't show up in K2. I'll check this in a while.

@mananjadhav
Copy link
Collaborator

Just went through the whole conversation. So when we did start the development we weren't hiding any menu options. With this PR, I implemented hiding the extra menu items (ie Netsuite Subsidiary and Xero Organization names). But IIRC when the initial sync isn't finished we don't show up and it worked as expected here.

Now there are two questions I have here:

  1. When we say before sync here, did we check isEmptyObject(policy?.connections) is true?
  2. @tienifr's video here, the QBO connection shows successful with the last sync timestamp. So it does seem to be BE sync issue?

@yuwenmemon yuwenmemon removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 22, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels Aug 22, 2024
@trjExpensify trjExpensify removed the Hot Pick Ready for an engineer to pick up and run with label Sep 2, 2024
@trjExpensify
Copy link
Contributor

Did @yuwenmemon's PR fix this, or is there more to do? (A.K.A - why is this still open? 😄).

@yuwenmemon
Copy link
Contributor

Yeah I think we can close

@sobitneupane
Copy link
Contributor

@trjExpensify Payment is due for C+ reivew.

@trjExpensify
Copy link
Contributor

Oh, sorry @sobitneupane. I missed that was an /App PR.

Payment summary as follows:

Go ahead and request on NewDot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review Weekly KSv2
Projects
Status: Done
Development

No branches or pull requests