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-11] [HOLD for payment 2024-10-10] Distance - It is not possible to create an expense with duplicate start and stop #50077

Closed
6 tasks done
IuliiaHerets opened this issue Oct 2, 2024 · 16 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. DeployBlockerCash This issue or pull request should block deployment Engineering Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Oct 2, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.43-0
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/5034762
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

Prerequisite:
As administrator, create a WS and invite the employee. All steps are performed on behalf of the employee

  1. Start a distance request
  2. Enter the start address "45n N Beach Rd, FL"
  3. Enter a different Stop address "Beach Access Path, Sunny Isles Beach, FL"
  4. Click on add stop
  5. Enter the same address as the start

Expected Result:

The user should be able to create an expense with a duplicate start and stop.

Actual Result:

It is not possible to create an expense with duplicate start and stop

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6622199_1727880780054.Recording__166.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @greg-schroeder
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Oct 2, 2024
Copy link

melvin-bot bot commented Oct 2, 2024

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

Copy link

melvin-bot bot commented Oct 2, 2024

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Oct 2, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Oct 2, 2024
Copy link
Contributor

github-actions bot commented Oct 2, 2024

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

@IuliiaHerets
Copy link
Author

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

@jasperhuangg
Copy link
Contributor

Looking

@MuaazArshad
Copy link
Contributor

Proposal

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

Distance - It is not possible to create an expense with duplicate start and stop

What is the root cause of that problem?

We are verifying an error when the condition nonEmptyWaypointsCount >= 2 is true. If there are more than 2 waypoints and any duplicates exist, the function will return true. However, the function should only return true if there are exactly 2 waypoints, and both are duplicates.

const duplicateWaypointsError = useMemo(

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

To solve this, we should modify the condition that was introduced.

const duplicateWaypointsError = useMemo(
        () => nonEmptyWaypointsCount == 2 && Object.keys(validatedWaypoints).length !== nonEmptyWaypointsCount,
        [nonEmptyWaypointsCount, validatedWaypoints],
    );

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 2, 2024
@jasperhuangg
Copy link
Contributor

Kicked off the CP, will retest once it hits staging

@jasperhuangg
Copy link
Contributor

jasperhuangg commented Oct 2, 2024

Fix is on staging, asking QA for retest here

@kavimuru
Copy link

kavimuru commented Oct 2, 2024

@jasperhuangg
Copy link
Contributor

@kavimuru tester who claimed they reproduced it didn't follow the testing steps correctly, this has been fixed

Copy link

melvin-bot bot commented Oct 2, 2024

⚠️ 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 melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Oct 3, 2024
@melvin-bot melvin-bot bot changed the title Distance - It is not possible to create an expense with duplicate start and stop [HOLD for payment 2024-10-10] Distance - It is not possible to create an expense with duplicate start and stop Oct 3, 2024
Copy link

melvin-bot bot commented Oct 3, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 3, 2024
Copy link

melvin-bot bot commented Oct 3, 2024

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

If no regressions arise, payment will be issued on 2024-10-10. 🎊

Copy link

melvin-bot bot commented Oct 3, 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:

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

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 4, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-10-10] Distance - It is not possible to create an expense with duplicate start and stop [HOLD for payment 2024-10-11] [HOLD for payment 2024-10-10] Distance - It is not possible to create an expense with duplicate start and stop Oct 4, 2024
Copy link

melvin-bot bot commented Oct 4, 2024

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

If no regressions arise, payment will be issued on 2024-10-11. 🎊

Copy link

melvin-bot bot 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:

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

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. DeployBlockerCash This issue or pull request should block deployment Engineering Weekly KSv2
Projects
None yet
Development

No branches or pull requests

5 participants