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-07][$250] Import categories - Import spreadsheet option is available when workspace is connected to QBO #48913

Closed
6 tasks done
IuliiaHerets opened this issue Sep 10, 2024 · 26 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Sep 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.31-14
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

Precondition:

  • Workspace is connected to QBO.
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Categories.
  3. Click 3-dot menu.
  4. Click Import spreadsheet.

Expected Result:

Import spreadsheet option should be hidden when there is connection in the workspace, as the categories are imported from the connection.

Actual Result:

Import spreadsheet option is available when workspace is connected to QBO

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6598840_1725980882503.20240910_230525.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021834239004653240865
  • Upwork Job ID: 1834239004653240865
  • Last Price Increase: 2024-09-12
  • Automatic offers:
    • Nodebrute | Contributor | 104026058
Issue OwnerCurrent Issue Owner: @thesahindia
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 10, 2024
Copy link

melvin-bot bot commented Sep 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.

@IuliiaHerets
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

@IuliiaHerets
Copy link
Author

We think that this bug might be related to #wave-control

@Nodebrute
Copy link
Contributor

Proposal

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

Import spreadsheet option is available when workspace is connected to QBO

What is the root cause of that problem?

We are not adding any condition here to check this

{
icon: Expensicons.Table,
text: translate('spreadsheet.importSpreadsheet'),
onSelected: () => {
if (isOffline) {
Modal.close(() => setIsOfflineModalVisible(true));
return;
}
Navigation.navigate(ROUTES.WORKSPACE_CATEGORIES_IMPORT.getRoute(policyId));
},
},

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

We can conditionally push this item only if !hasAccountingConnection

{
icon: Expensicons.Table,
text: translate('spreadsheet.importSpreadsheet'),
onSelected: () => {
if (isOffline) {
Modal.close(() => setIsOfflineModalVisible(true));
return;
}
Navigation.navigate(ROUTES.WORKSPACE_CATEGORIES_IMPORT.getRoute(policyId));
},
},

What alternative solutions did you explore? (Optional)

@nkdengineer
Copy link
Contributor

Proposal

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

What is the root cause of that problem?

We always show the import sheet option without checking we connect an accounting or not

const threeDotsMenuItems = useMemo(() => {

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

We should use the same way we display the add category button

{!PolicyUtils.hasAccountingConnections(policy) && (

const menuItems = [];
if (!PolicyUtils.hasAccountingConnections(policy)) {
    menuItems.push({
        icon: Expensicons.Table,
        text: translate('spreadsheet.importSpreadsheet'),
        onSelected: () => {
            if (isOffline) {
                Modal.close(() => setIsOfflineModalVisible(true));
                return;
            }
            Navigation.navigate(ROUTES.WORKSPACE_CATEGORIES_IMPORT.getRoute(policyId));
        },
    })
}
menuItems.push({
    icon: Expensicons.Download,
    text: translate('spreadsheet.downloadCSV'),
    onSelected: () => {
        if (isOffline) {
            Modal.close(() => setIsOfflineModalVisible(true));
            return;
        }
        Category.downloadCategoriesCSV(policyId);
    },
});

const threeDotsMenuItems = useMemo(() => {

If we already connected an accounting, we also need to display the not found page in ImportCategoriesPage and ImportedCategoriesPage page. We can display a helpful message that help user know that they already connected an accounting and cannot import category

What alternative solutions did you explore? (Optional)

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.

@abekkala abekkala added the External Added to denote the issue can be worked on by a contributor label Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

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

@melvin-bot melvin-bot bot changed the title Import categories - Import spreadsheet option is available when workspace is connected to QBO [$250] Import categories - Import spreadsheet option is available when workspace is connected to QBO Sep 12, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

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

@thesahindia
Copy link
Member

thesahindia commented Sep 13, 2024

@Nodebrute's proposal was first so I will prefer them!

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Sep 13, 2024

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

@nkdengineer
Copy link
Contributor

@thesahindia I think we also need to display the not found page in ImportCategoriesPage and ImportedCategoriesPage to prevent users from going to this page by deep link when we already connect an accounting.

@melvin-bot melvin-bot bot added the Overdue label Sep 16, 2024
@chiragsalian
Copy link
Contributor

Yeah i believe that is correct @nkdengineer. @thesahindia, what are your thoughts?

Copy link

melvin-bot bot commented Sep 16, 2024

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

@thesahindia
Copy link
Member

Yeah i believe that is correct @nkdengineer. @thesahindia, what are your thoughts?

Yes, it is correct, but I wasn’t sure if I should consider it for deciding the assignment here, as these things should be addressed in the PR.

I am comfortable with either of them being assigned.

@melvin-bot melvin-bot bot removed the Overdue label Sep 18, 2024
@nkdengineer
Copy link
Contributor

I think this is the thing that we can miss in the PR if we don't address this in the proposal.

@Nodebrute
Copy link
Contributor

The main expected result was that the 'Import Spreadsheet' option should be hidden, which I addressed correctly in my proposal. Additionally, the 'Not Here' page can be easily handled in the PR. I don’t believe I could have overlooked that in the PR. We also have a checklist that includes testing the component with a deep link.

- [ ] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.

cc: @thesahindia @chiragsalian

@chiragsalian
Copy link
Contributor

Hmm okay alright, sorry @nkdengineer. @Nodebrute makes a convincing point and was first so I'll give it over to them.
Feel free to create the PR @Nodebrute.

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

melvin-bot bot commented Sep 18, 2024

📣 @Nodebrute 🎉 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 📖

@Nodebrute
Copy link
Contributor

I’ll raise a PR in a few hours.

@abekkala
Copy link
Contributor

@Nodebrute can you link the PR please?

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 20, 2024
@Nodebrute
Copy link
Contributor

The PR is ready for review.

@Nodebrute
Copy link
Contributor

The production deploy automation failed: This should be on [HOLD for Payment 2024-10-07] according to #49855 production deploy checklist, confirmed in #49545 (comment)

@abekkala abekkala changed the title [$250] Import categories - Import spreadsheet option is available when workspace is connected to QBO [HOLD for Payment 2024-10-07][$250] Import categories - Import spreadsheet option is available when workspace is connected to QBO Oct 4, 2024
@abekkala
Copy link
Contributor

abekkala commented Oct 4, 2024

PAYMENT SUMMARY FOR OCT 07

@abekkala
Copy link
Contributor

abekkala commented Oct 4, 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:

  • [@thesahindia ] The PR that introduced the bug has been identified. Link to the PR:
  • [@thesahindia ] 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:
  • [@thesahindia ] 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.
  • [@thesahindia ] Determine if we should create a regression test for this bug.
  • [@thesahindia ] 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.
  • [@abekkala] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@thesahindia
Copy link
Member

It was implemented like this. We probably forgot about this case.

We should add a test case. The steps are below:

Precondition: Workspace is connected to QBO.

  1. Go to Workspace Settings > Categories.
  2. Click the three-dot menu.
  3. Verify that the "Import Spreadsheet" button is not displayed.

@abekkala
Copy link
Contributor

abekkala commented Oct 7, 2024

PAYMENT SUMMARY FOR OCT 07

  • Fix: @Nodebrute [$250] payment sent and contract ended - thank you! 🎉
  • PR Review: @thesahindia [$250] payment via NewDot

@abekkala abekkala closed this as completed Oct 7, 2024
@garrettmknight
Copy link
Contributor

$250 approved for @thesahindia

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. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants