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 for payment 2024-10-25] [$250] [QBO] There is no option to enter credentials. #50357

Closed
6 tasks done
m-natarajan opened this issue Oct 7, 2024 · 29 comments
Closed
6 tasks done
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@m-natarajan
Copy link

m-natarajan commented Oct 7, 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.45-3
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @hungvu193
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1728292694875429

Action Performed:

  1. Go to Workspace => Accounting.
  2. Connect your workspace with QBO.
  3. From QBO dashboard, disconnect Expensify App.
  4. Go back to ND, click the menu from the Accounting page => Sync now.
  5. Notice that's an error shows. Click threedot menu again, notice that you won't see Enter credentials option.

Expected Result:

If there's an authentication error, we should have Enter credentials option from three dot menu.

Actual Result:

There's no Enter credentials option even when we have authentication error.

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

Screen.Recording.2024-10-07.at.16.17.53.mov
Recording.634.mp4
Add any screenshot/video evidence

View all open jobs on GitHub

Recording.634.mp4
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021844020791272244172
  • Upwork Job ID: 1844020791272244172
  • Last Price Increase: 2024-10-09
  • Automatic offers:
    • layacat | Contributor | 104419097
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @bfitzexpensify
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 7, 2024
Copy link

melvin-bot bot commented Oct 7, 2024

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

@Nodebrute
Copy link
Contributor

Nodebrute commented Oct 7, 2024

Proposal

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

There is no option to enter credentials

What is the root cause of that problem?

We don't enter credentials for qbo but we still show sync now button even if we have authentication error

: [
{
icon: Expensicons.Sync,
text: translate('workspace.accounting.syncNow'),
onSelected: () => syncConnection(policyID, connectedIntegration),
disabled: isOffline,
},
]),

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

IMO we should hide the sync now button when we have an authentication error and only show the disconnect button. We can do something like this(pseudo-code)

   // Conditionally add Sync Now button if isAuthenticationError is false
        ...(!isAuthenticationError(policy, connectedIntegration) && !shouldShowEnterCredentials
            ? [
                  {
                      icon: Expensicons.Sync,
                      text: translate('workspace.accounting.syncNow'),
                      onSelected: () => syncConnection(policyID, connectedIntegration),
                      disabled: isOffline,
                  },
              ]
            : []),

Note

This is just pseudo-code we can make this more error-proof by adding more checks. We can refine the code further in the PR. We can also fix this for Xero

What alternative solutions did you explore? (Optional)

We can push a new button instead of sync now (for cases where we have an authentication error) if the user clicks on it, the user should be navigated to the QuickBooks website.

@layacat
Copy link
Contributor

layacat commented Oct 7, 2024

Proposal

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

There is no option to enter credentials for QBO and I think for Xero as well

What is the root cause of that problem?

We're hiding the Enter credentials button in here for Xero and QBO, which caused this issue:

...(shouldShowEnterCredentials && (connectedIntegration === CONST.POLICY.CONNECTIONS.NAME.SAGE_INTACCT || connectedIntegration === CONST.POLICY.CONNECTIONS.NAME.NETSUITE)

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

We should remove this check from the condition above:

 (connectedIntegration === CONST.POLICY.CONNECTIONS.NAME.SAGE_INTACCT || connectedIntegration === CONST.POLICY.CONNECTIONS.NAME.NETSUITE) 

What alternative solutions did you explore? (Optional)

N/A
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@hungvu193
Copy link
Contributor

Hi @dylanexpensify, I reported this issue also have good amount of context since I worked on QBO, Xero and reviewed credentials PR. I'm happy to take this one as C+

@dylanexpensify
Copy link
Contributor

Sounds great @hungvu193 !

@dylanexpensify dylanexpensify added the External Added to denote the issue can be worked on by a contributor label Oct 9, 2024
@melvin-bot melvin-bot bot changed the title [QBO] There is no option to enter credentials. [$250] [QBO] There is no option to enter credentials. Oct 9, 2024
Copy link

melvin-bot bot commented Oct 9, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 9, 2024
Copy link

melvin-bot bot commented Oct 9, 2024

Current assignee @hungvu193 is eligible for the External assigner, not assigning anyone new.

@hungvu193
Copy link
Contributor

Thanks for the proposals, everyone! It's clear that we shouldn't hide the Enter credentials option for both Xero and QBO.
@layacat 's proposal here has the correct RCA and straightforward solution.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Oct 9, 2024

Triggered auto assignment to @deetergp, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@twilight2294
Copy link
Contributor

twilight2294 commented Oct 10, 2024

Edited by proposal-police: This proposal was edited at 2024-10-10 19:42:21 UTC.

Proposal

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

There is no option to enter credentials.

What is the root cause of that problem?

In PR #48918, we wanted to hide the enter credentials option for NETSUITE and SAGE_INTACCT, but by mistake we allowed it for the mentioned 2 connections, in the PR diff you can see that we have the following comment:
Screenshot 2024-10-11 at 1 08 13 AM

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

So the correct fix for this issue is that we should not allow the credentials button for NETSUITE and SAGE_INTACCT:

      ...(shouldShowEnterCredentials && (connectedIntegration !== CONST.POLICY.CONNECTIONS.NAME.SAGE_INTACCT && connectedIntegration !== CONST.POLICY.CONNECTIONS.NAME.NETSUITE)

What alternative solutions did you explore? (Optional)

Alternatively we can move that check in shouldShowEnterCredentials itself

@twilight2294
Copy link
Contributor

@hungvu193 @deetergp , can you check the above proposal please, I feel the selected proposal isn't correct and will cause regression, we want to hide the connection for NETSUITE and SAGE_INTACCT and only show for Xero and QBO:
Screenshot 2024-10-11 at 1 11 34 AM

@hungvu193
Copy link
Contributor

hungvu193 commented Oct 10, 2024

@hungvu193 @deetergp , can you check the above proposal please, I feel the selected proposal isn't correct and will cause regression, we want to hide the connection for NETSUITE and SAGE_INTACCT and only show for Xero and QBO:

Screenshot 2024-10-11 at 1 11 34 AM

That's outdated comment, we removed it

@hungvu193
Copy link
Contributor

@deetergp can you assign @layacat so he can start working on the PR?

@melvin-bot melvin-bot bot added the Overdue label Oct 14, 2024
Copy link

melvin-bot bot commented Oct 14, 2024

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 14, 2024
Copy link

melvin-bot bot commented Oct 14, 2024

📣 @layacat 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot removed the Overdue label Oct 14, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review and removed Daily KSv2 labels Oct 15, 2024
@dylanexpensify dylanexpensify added the Bug Something is broken. Auto assigns a BugZero manager. label Oct 15, 2024
Copy link

melvin-bot bot commented Oct 15, 2024

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 15, 2024
@dylanexpensify
Copy link
Contributor

Reassigning as I head to parental leave next week! Thanks Ben!

@bfitzexpensify
Copy link
Contributor

PR in review

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Oct 18, 2024
@melvin-bot melvin-bot bot changed the title [$250] [QBO] There is no option to enter credentials. [HOLD for payment 2024-10-25] [$250] [QBO] There is no option to enter credentials. Oct 18, 2024
Copy link

melvin-bot bot commented Oct 18, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 18, 2024
Copy link

melvin-bot bot commented Oct 18, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.50-8 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-10-25. 🎊

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

Copy link

melvin-bot bot commented Oct 18, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@hungvu193] The PR that introduced the bug has been identified. Link to the PR:
  • [@hungvu193] 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:
  • [@hungvu193] A discussion in #expensify-bugs 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:
  • [@hungvu193] Determine if we should create a regression test for this bug.
  • [@hungvu193] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@bfitzexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@layacat
Copy link
Contributor

layacat commented Oct 21, 2024

I submitted work for payment on Upwork. Please check

@bfitzexpensify bfitzexpensify added Daily KSv2 and removed Weekly KSv2 labels Oct 23, 2024
@bfitzexpensify
Copy link
Contributor

Thanks @layacat - payment sorted.

@hungvu193, please complete the BZ checklist and I'll post the summary for the NewDot manual request

@hungvu193
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR: [NetSuite] Add authentication error #48918
  • 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: https://github.com/Expensify/App/pull/48918/files#r1816794572
  • A discussion in #expensify-bugs 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: N/A
  • Determine if we should create a regression test for this bug: Yes

Regression Test:

  1. Go to Workspace => Accounting.
  2. Connect your workspace with QBO.
  3. From QBO dashboard, disconnect Expensify App.
  4. Go back to ND, click the menu from the Accounting page => Sync now.
  5. Notice that's an error is shown. Click threedot menu again.
  6. Verify that Enter credentials option appears from three dot menu.

Do we 👍 or 👎 ?

@melvin-bot melvin-bot bot added Daily KSv2 and removed Daily KSv2 labels Oct 25, 2024
Copy link

melvin-bot bot commented Oct 28, 2024

@deetergp, @hungvu193, @bfitzexpensify, @layacat Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Oct 28, 2024
@bfitzexpensify
Copy link
Contributor

Payment summary:

@hungvu193 to be paid $250 for C+ work

Copy link

melvin-bot bot commented Oct 28, 2024

@deetergp @bfitzexpensify Be sure to fill out the Contact List!

@garrettmknight
Copy link
Contributor

$250 approved for @hungvu193

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

9 participants