Skip to content

[HOLD for Payment 2024-10-07][$250] Import categories - Import spreadsheet option is available when workspace is connected to QBO #48913

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.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

Activity

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

    @melvin-bot

    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.

  3. IuliiaHerets commented on Sep 10, 2024

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

  4. IuliiaHerets commented on Sep 10, 2024

    @IuliiaHerets
    Author

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

  5. Nodebrute commented on Sep 10, 2024

    @Nodebrute
    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)

  6. nkdengineer commented on Sep 10, 2024

    @nkdengineer
    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.

  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Sep 12, 2024
  8. melvin-bot commented on Sep 12, 2024

    @melvin-bot
  9. 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[/+] on Sep 12, 2024
  10. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 12, 2024
  11. melvin-bot commented on Sep 12, 2024

    @melvin-bot

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

  12. thesahindia commented on Sep 13, 2024

    @thesahindia
    Member

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

    🎀 👀 🎀 C+ reviewed

  13. 13 remaining items

  14. melvin-bot commented on Sep 18, 2024

    @melvin-bot

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

  15. Nodebrute commented on Sep 19, 2024

    @Nodebrute
    Contributor

    I’ll raise a PR in a few hours.

  16. abekkala commented on Sep 20, 2024

    @abekkala
    Contributor

    @Nodebrute can you link the PR please?

  17. Nodebrute commented on Sep 20, 2024

    @Nodebrute
    Contributor

    The PR is ready for review.

  18. Nodebrute commented on Oct 3, 2024

    @Nodebrute
    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)

  19. 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[/+] on Oct 4, 2024
  20. abekkala commented on Oct 4, 2024

    @abekkala
    Contributor

    PAYMENT SUMMARY FOR OCT 07

  21. abekkala commented on Oct 4, 2024

    @abekkala
    Contributor

    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:
  22. thesahindia commented on Oct 7, 2024

    @thesahindia
    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.
  23. abekkala commented on Oct 7, 2024

    @abekkala
    Contributor

    PAYMENT SUMMARY FOR OCT 07

    • Fix: @Nodebrute [$250] payment sent and contract ended - thank you! 🎉
    • PR Review: @thesahindia [$250] payment via NewDot
  24. garrettmknight commented on Oct 8, 2024

    @garrettmknight
    Contributor

    $250 approved for @thesahindia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions