Skip to content

[HOLD for payment 2024-08-29] [$250] NetSuite - Sync error isn't displayed when connecting to NetSuite with invalid credentials #46768

Closed

Description

@lanitochka17

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.16-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: https://expensify.testrail.io/index.php?/tests/view/4807616&group_by=cases:section_id&group_id=314239&group_order=asc
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 with invalid credentials

Expected Result:

Sync error should be displayed

Actual Result:

Sync error isn't displayed when connecting to NetSuite with invalid credentials

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

Bug6561075_1722694354704.JLKK3142.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ceab16370193c3b8
  • Upwork Job ID: 1820591512049375650
  • Last Price Increase: 2024-08-05
Issue OwnerCurrent Issue Owner: @VictoriaExpensify

Activity

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

    @melvin-bot

    Triggered auto assignment to @sakluger (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. nyomanjyotisa commented on Aug 5, 2024

    @nyomanjyotisa
    Member

    Proposal

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

    Sync error isn't displayed when connecting to NetSuite with invalid credentials

    What is the root cause of that problem?

    We don't return true on hasSynchronizationError function if the net suite connection verified value is false, since verified is an indicator of whether the sync connection has been successful

    function hasSynchronizationError(policy: OnyxEntry<Policy>, connectionName: PolicyConnectionName, isSyncInProgress: boolean): boolean {
    // NetSuite does not use the conventional lastSync object, so we need to check for lastErrorSyncDate
    if (connectionName === CONST.POLICY.CONNECTIONS.NAME.NETSUITE) {
    return !isSyncInProgress && !!policy?.connections?.[CONST.POLICY.CONNECTIONS.NAME.NETSUITE].lastErrorSyncDate;
    }
    return !isSyncInProgress && policy?.connections?.[connectionName]?.lastSync?.isSuccessful === false;
    }

    /** Whether the sync connection has been successful */
    verified: boolean;

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

    Update this code to the following to return true if the net suite connection verified value is false

        if (connectionName === CONST.POLICY.CONNECTIONS.NAME.NETSUITE) {
            return !isSyncInProgress && (!!policy?.connections?.[CONST.POLICY.CONNECTIONS.NAME.NETSUITE].lastErrorSyncDate || !policy?.connections?.[CONST.POLICY.CONNECTIONS.NAME.NETSUITE]?.verified);
        }
    

    RESULT

    New-Expensify.26.mp4

    What alternative solutions did you explore? (Optional)

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 5, 2024
  5. melvin-bot commented on Aug 5, 2024

    @melvin-bot
  6. changed the title [-]NetSuite - Sync error isn't displayed when connecting to NetSuite with invalid credentials[/-] [+][$250] NetSuite - Sync error isn't displayed when connecting to NetSuite with invalid credentials[/+] on Aug 5, 2024
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Aug 5, 2024
  8. melvin-bot commented on Aug 5, 2024

    @melvin-bot

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

  9. sakluger commented on Aug 5, 2024

    @sakluger
    Contributor

    Tagging @yuwenmemon, @mananjadhav, @shubham1206agra since you all worked on the design doc for this feature.

  10. shubham1206agra commented on Aug 6, 2024

    @shubham1206agra
    Contributor

    @sakluger This looks like a BE issue.

  11. 30 remaining items

  12. melvin-bot commented on Aug 24, 2024

    @melvin-bot

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

  13. brunovjk commented on Aug 26, 2024

    @brunovjk
    Contributor
    • [@brunovjk] The PR that introduced the bug has been identified. Link to the PR: Not a regression, but an exception for NetSuite in error checking logic: commit
    • [@brunovjk] 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: Add handling of the NetSuite beta in NewDot #44064 (comment)
    • [@brunovjk] 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: No discussion needed as this was not a systemic issue but a missed check for verified === false.
    • [@brunovjk] Determine if we should create a regression test for this bug. Yes
    • [@brunovjk] 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.

    Regression Test Proposal

    • Click on FAB - New workspace
    • Enable "Accounting" in the "More features" page
    • Navigate to "Accounting"
    • Connect to NetSuite with invalid credentials
    • Verify sync error displayed
    • Do we agree 👍 or 👎
  14. melvin-bot commented on Aug 29, 2024

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@VictoriaExpensify)

    • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1820591512049375650/hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  15. tgolen commented on Aug 30, 2024

    @tgolen
    Contributor

    @VictoriaExpensify Can you please complete the checklist here to close this one out?

  16. VictoriaExpensify commented on Sep 2, 2024

    @VictoriaExpensify
    Contributor

    Created an issue to add the regression test to TestRail - https://github.com/Expensify/Expensify/issues/425122

  17. VictoriaExpensify commented on Sep 2, 2024

    @VictoriaExpensify
    Contributor

    Payment summary:

    Contributor: @nyomanjyotisa paid $250 via Upwork Job
    Contributor+: @brunovjk paid $250 via Upwork Job

    Thanks for your work on this issue!

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions