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

[CHECKLIST] [$250] NetSuite - "Subsidiary" shows while the connection is syncs for the first time #48274

Closed
1 of 6 tasks
lanitochka17 opened this issue Aug 29, 2024 · 22 comments
Closed
1 of 6 tasks
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

@lanitochka17
Copy link

lanitochka17 commented Aug 29, 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.26-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: https://expensify.testrail.io/index.php?/tests/view/4901046&group_by=cases:section_id&group_order=asc&group_id=314239
Issue reported by: Applause - Internal Team

Action Performed:

  1. Open the app
  2. Log in with a new Gmail account
  3. Click on FAB - New workspace
  4. Enable "Accounting" in the "More features" page.
  5. Navigate to "Accounting"
  6. Connect to NetSuite and upgrade the workspace to Control when asked
  7. Wait for the sync to finish

Expected Result:

"Subsidiary" should only show after the sync finished

Actual Result:

"Subsidiary" shows while the connection syncs for the first time

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

Bug6586205_1724916783236.bandicam_2024-08-29_09-23-05-717.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a057b4870b92dd2e
  • Upwork Job ID: 1829528097305498004
  • Last Price Increase: 2024-08-30
  • Automatic offers:
    • ikevin127 | Reviewer | 103803952
    • nyomanjyotisa | Contributor | 103803953
Issue OwnerCurrent Issue Owner: @garrettmknight
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 29, 2024
Copy link

melvin-bot bot commented Aug 29, 2024

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

@garrettmknight 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-control

@Nodebrute
Copy link
Contributor

Nodebrute commented Aug 29, 2024

Proposal

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

"Subsidiary" shows while the connection is syncs for the first time

What is the root cause of that problem?

When the sync is in progress we don't hide integrationSpecificMenuItems

...(isEmptyObject(integrationSpecificMenuItems) || shouldShowSynchronizationError || isEmptyObject(policy?.connections) ? [] : [integrationSpecificMenuItems]),

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

We should hide menuItems when sync is in progress. Add isSyncInProgress here

...(isEmptyObject(integrationSpecificMenuItems) || shouldShowSynchronizationError || isEmptyObject(policy?.connections) ? [] : [integrationSpecificMenuItems]),

(isEmptyObject(integrationSpecificMenuItems) || shouldShowSynchronizationError || isEmptyObject(policy?.connections) || isSyncInProgress ? [] : [integrationSpecificMenuItems])

What alternative solutions did you explore? (Optional)

@nyomanjyotisa
Copy link
Contributor

Proposal

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

NetSuite - "Subsidiary" shows while the connection is syncs for the first time

What is the root cause of that problem?

We display the "Subsidiary" although there is no value to display for the Subsidiary

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

We should return empty object if there is no value for Subsidiary, like we do for the sage intact entity

case CONST.POLICY.CONNECTIONS.NAME.SAGE_INTACCT:
return !sageIntacctEntityList.length
? {}
: {
description: translate('workspace.intacct.entity'),

Update this code to the following

return !policy?.connections?.netsuite?.options?.config?.subsidiary 
  ? {} 
  : {
      description: translate('workspace.netsuite.subsidiary'),
      ...
  };

additionally, we can do the same for Xero Organization Name

What alternative solutions did you explore? (Optional)

@garrettmknight garrettmknight added the External Added to denote the issue can be worked on by a contributor label Aug 30, 2024
Copy link

melvin-bot bot commented Aug 30, 2024

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

@melvin-bot melvin-bot bot changed the title NetSuite - "Subsidiary" shows while the connection is syncs for the first time [$250] NetSuite - "Subsidiary" shows while the connection is syncs for the first time Aug 30, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 30, 2024
Copy link

melvin-bot bot commented Aug 30, 2024

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

@ikevin127
Copy link
Contributor

@Nodebrute Thank you for the proposal. While the observation mentioned in your proposal's RCA is not wrong, when it comes to the solution I think it's best to only hide integrationSpecificMenuItems specific sections if there's no information to be displayed for a specific section instead of hiding all sections based on isSyncInProgress.

The reasoning would be that if let's say isSyncInProgress is false (sync finished) but there's no data returned for that specific section -> then the UI will still show the empty Subsidiary section in our case.

@ikevin127
Copy link
Contributor

ikevin127 commented Aug 30, 2024

@nyomanjyotisa's proposal looks good to me. The RCA is correct and the proposed solution fixes the issue as per the Expected result, following the code pattern we already use in the SageIntacct case.

PR Note: We should keep this within scope and only fix the NetSuite - Subsidiary issue by using the !netSuiteSubsidiaryList?.length ? {} : {... check, similar (but reverse) to what is used in the onPress to return early (see SageIntacct case model).

additionally, we can do the same for Xero Organization Name

cc @Beamanator What do you think about the above PR Note regarding keeping the fix for this issue within scope, do you agree or think we should extend the fix to handle the Xero - Organization case as well ?

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Aug 30, 2024

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

Copy link

melvin-bot bot commented Sep 3, 2024

@garrettmknight, @Beamanator, @ikevin127 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Sep 3, 2024
@ikevin127
Copy link
Contributor

Currently discussing (scroll down from this comment) what to do with NetSuite related issues when it comes to people who don't have credentials, this includes all Contributors and all but one C+.

Quoting:

I could argue that the change / fix is obvious to the point where one wouldn't even need the credentials to test - but I understand that that's not not how we do things.

If I don't get access to the credentials soon (this week), I guess there's no other option then to have you take over.

C+ w/ Netsuite credentials said:
And contributors will not have access to these credentials anytime soon

^ Not sure what happens to the contributors which posted good proposals on these issues given they will never have the credentials to test the changes if they are assigned and have to complete their PR Author Checklist :think0:

cc @Beamanator for context.

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

melvin-bot bot commented Sep 3, 2024

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

Offer link
Upwork job

Copy link

melvin-bot bot commented Sep 3, 2024

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

@Beamanator
Copy link
Contributor

@ikevin127 - honestly i think the solution is straightforward enough to also apply the Xero fix

@melvin-bot melvin-bot bot added the Weekly KSv2 label Sep 4, 2024
@ikevin127
Copy link
Contributor

⚠️ Automation failed here -> this should be on [HOLD for Payment 2024-09-20] according to 5 days ago's production deploy from #48519 (comment).

cc @garrettmknight

@garrettmknight garrettmknight changed the title [$250] NetSuite - "Subsidiary" shows while the connection is syncs for the first time [HOLD for Payment 2024-09-20] [$250] NetSuite - "Subsidiary" shows while the connection is syncs for the first time Sep 19, 2024
@garrettmknight garrettmknight added Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review labels Sep 19, 2024
@garrettmknight
Copy link
Contributor

Payment Summary:

@ikevin127 can you complete the checklist?

@garrettmknight garrettmknight changed the title [HOLD for Payment 2024-09-20] [$250] NetSuite - "Subsidiary" shows while the connection is syncs for the first time [CHECKLIST] [$250] NetSuite - "Subsidiary" shows while the connection is syncs for the first time Sep 23, 2024
@ikevin127
Copy link
Contributor

Regression Test Proposal

  1. Enable "Accounting" in the "More features" page of a Workspace.
  2. Navigate to the "Accounting" page.
  3. Connect to NetSuite and upgrade the workspace to Control when asked.
  4. Verify that 'Subsidiary' does not show while the connection is synchronizing for the first time, but only after the connection has successfully synced.

Do we agree 👍 or 👎.

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Sep 26, 2024
Copy link

melvin-bot bot commented Sep 26, 2024

@garrettmknight @Beamanator @ikevin127 @nyomanjyotisa this issue is now 4 weeks old, please consider:

  • Finding a contributor to fix the bug
  • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

@ikevin127
Copy link
Contributor

BZ Checklist completed, awaiting for BZ team member to close the issue.

@melvin-bot melvin-bot bot removed the Overdue label Sep 26, 2024
Copy link

melvin-bot bot commented Sep 30, 2024

@garrettmknight, @Beamanator, @ikevin127, @nyomanjyotisa Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Sep 30, 2024
@Beamanator
Copy link
Contributor

Assigning back to @garrettmknight for payment 🙏

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

6 participants