Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.12k stars 2.62k forks source link

[HOLD for payment 2024-07-17] Netsuite - Categories copy mentions "Xero settings" instead of "NetSuite" settings #44591

Open lanitochka17 opened 2 weeks ago

lanitochka17 commented 2 weeks ago

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-3.1 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team

Issue found when executing PR https://github.com/Expensify/App/pull/44038

Action Performed:

Precondition:

Expected Result:

The Categories copy should mention "NetSuite settings"

Actual Result:

The Categories copy should mention "NetSuite settings"

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/822e7c0f-ea65-4b3a-bf4f-8ced4907d3b1

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~012bfdd3cfbe5588a2
  • Upwork Job ID: 1806537315771441691
  • Last Price Increase: 2024-06-28
Issue OwnerCurrent Issue Owner: @sobitneupane
melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to @robertjchen (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

github-actions[bot] commented 2 weeks ago

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.
lanitochka17 commented 2 weeks ago

@robertjchen 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 commented 2 weeks ago

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

nyomanjyotisa commented 2 weeks ago

Proposal

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

Categories copy mentions "Xero settings" instead of "NetSuite" settings

What is the root cause of that problem?

https://github.com/Expensify/App/blob/1d607acab9c47f2e0da4e8c85de5d90e2d47c11b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx#L270 this code only handling Xero and Quickbooks, it will always show Xero if not connected to Quickbooks

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

add new const isConnectedToXero on WorkspaceCategoriesPage

const isConnectedToXero = !!policy?.connections?.xero;

change this code to the following code to handle Xero, Quickbooks, and NetSuite

{`${translate(isConnectedToQbo ? 'workspace.accounting.qbo' : isConnectedToXero ? 'workspace.accounting.xero' : 'workspace.accounting.netsuite')} ${translate('workspace.accounting.settings')}`}

Need to update the following too: https://github.com/Expensify/App/blob/1d607acab9c47f2e0da4e8c85de5d90e2d47c11b/src/pages/workspace/tags/WorkspaceTagsPage.tsx#L283

https://github.com/Expensify/App/blob/1d607acab9c47f2e0da4e8c85de5d90e2d47c11b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx#L255

https://github.com/Expensify/App/blob/1d607acab9c47f2e0da4e8c85de5d90e2d47c11b/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx#L28-L34

What alternative solutions did you explore? (Optional)

create the following reusable function on PolicyUtils and implement it in all codes above

function getConnectionTypeTranslationKey(connections: Connections | undefined): TranslationPaths {
    if (connections?.quickbooksOnline) {
        return 'workspace.accounting.qbo';
    } else if (connections?.xero) {
        return 'workspace.accounting.xero';
    } else {
        return 'workspace.accounting.netsuite';
    }
}

Use it like this:

{`${translate(PolicyUtils.getConnectionTypeTranslationKey(policy?.connections))} ${translate('workspace.accounting.settings')}`}
melvin-bot[bot] commented 2 weeks ago

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

melvin-bot[bot] commented 2 weeks ago

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

melvin-bot[bot] commented 2 weeks ago

Upwork job price has been updated to $125

nyomanjyotisa commented 2 weeks ago

Proposal updated

mananjadhav commented 2 weeks ago

@robertjchen This isn’t a deploy blocker. The NetSuite work is in active development. I think this should be added to the NetSuite project scope. We need to fix the hardcoding the way I recently did for Connect button. Wdyt @yuwenmemon @JmillsExpensify

This needs to be fixed for categories, taxes, etc. pages.

Also @nyomanjyotisa we have atleast another 2-3 integrations in progress. We can’t have isConnected key for every connection.

I recently added CONNECTIONS.NAME_USER_FRIENDLY object. We can use that to fix it. But as I said this should be covered within the NetSuite scope, need not be external.

robertjchen commented 2 weeks ago

Got it, that makes sense!

mananjadhav commented 1 week ago

I've raised the PR to fix this.

melvin-bot[bot] commented 1 week ago

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

melvin-bot[bot] commented 2 days ago

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

melvin-bot[bot] commented 2 days ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.5-13 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-07-17. :confetti_ball:

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