You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-03-13] [HOLD for payment 2024-02-20] [$500] [MEDIUM] Distance - Address is duplicated when dragging one point over an empty point #33919
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Version Number: 1.4.21-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: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
Action Performed:
Go to workspace chat > + > Request money > Distance
Click Finish
Enter an address and save it
Hold and drag the Finish point above the Start point
Expected Result:
The Finish point will become Start point
Actual Result:
The Finish point is duplicated to become Start point
This issue also occurs when dragging Start point with address to below empty Finish point
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Distance - Address is duplicated when dragging one point over an empty point[/-][+][$500] Distance - Address is duplicated when dragging one point over an empty point[/+]on Jan 4, 2024
Please re-state the problem that we are trying to solve in this issue.
The Finish point is duplicated to become Start point
This issue also occurs when dragging Start point with address to below empty Finish point
What is the root cause of that problem?
In here, we're not clearing the empty waypoint by using removeWaypoint, so when we update in Onyx, it will not override the existing waypoint, leading to duplicate waypoint.
What changes do you think we should make in order to solve the problem?
Use removeWaypoint to remove the empty waypoints when dragging.
More detailed steps:
Find waypoints that currently is not empty but become empty after the drag
Use removeWaypoint on them to remove them from Onyx. We can modify the removeWaypoint method to removeWaypoints and allow removing multiple waypoints at once
updateWaypoints, then removeWaypoints in here. This might require returning the Onyx.set inside removeWaypoints so we can wait for it, similar to how we wait for the updateWaypoints. We can also optimize it by merging these 2 operations to allow both removing and updating waypoints in 1 Onyx.set operation (something like removeAndUpdateWaypoints), but this will require some refactoring.
What alternative solutions did you explore? (Optional)
changed the title [-][HOLD for payment 2024-02-20] [$500] [MEDIUM] Distance - Address is duplicated when dragging one point over an empty point[/-][+][HOLD for payment 2024-03-13] [HOLD for payment 2024-02-20] [$500] [MEDIUM] Distance - Address is duplicated when dragging one point over an empty point[/+]on Mar 6, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.47-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
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:
[@parasharrajat] The PR that introduced the bug has been identified. Link to the PR:
[@parasharrajat] 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:
[@parasharrajat] 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:
[@parasharrajat] Determine if we should create a regression test for this bug.
[@parasharrajat] 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.
[@stephanieelliott] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
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:
[@parasharrajat] 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: Not needed
[@parasharrajat] Determine if we should create a regression test for this bug. yes
[@parasharrajat] 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 Steps
Press FAB >> Request money >> Distance
Choose one waypoint and leave the other empty
Drag one waypoint over another to switch order
Verify the empty and the filled waypoints are switched
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Activity
[-]Distance - Address is duplicated when dragging one point over an empty point[/-][+][$500] Distance - Address is duplicated when dragging one point over an empty point[/+]melvin-bot commentedon Jan 4, 2024
Job added to Upwork: https://www.upwork.com/jobs/~019049b6059932909e
melvin-bot commentedon Jan 4, 2024
Triggered auto assignment to @stephanieelliott (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jan 4, 2024
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Jan 4, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (
External)tienifr commentedon Jan 4, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The Finish point is duplicated to become Start point
This issue also occurs when dragging Start point with address to below empty Finish point
What is the root cause of that problem?
In here, we're not clearing the empty waypoint by using
removeWaypoint, so when we update in Onyx, it will not override the existing waypoint, leading to duplicate waypoint.What changes do you think we should make in order to solve the problem?
Use
removeWaypointto remove the empty waypoints when dragging.More detailed steps:
removeWaypointon them to remove them from Onyx. We can modify theremoveWaypointmethod toremoveWaypointsand allow removing multiple waypoints at onceupdateWaypoints, thenremoveWaypointsin here. This might require returning theOnyx.setinsideremoveWaypointsso we can wait for it, similar to how we wait for theupdateWaypoints. We can also optimize it by merging these 2 operations to allow both removing and updating waypoints in 1Onyx.setoperation (something likeremoveAndUpdateWaypoints), but this will require some refactoring.What alternative solutions did you explore? (Optional)
NA
aim-salam commentedon Jan 4, 2024
.
parasharrajat commentedon Jan 4, 2024
@tienifr's proposal makes sense to me.
🎀 👀 🎀 C+ reviewed
79 remaining items
[-][HOLD for payment 2024-02-20] [$500] [MEDIUM] Distance - Address is duplicated when dragging one point over an empty point[/-][+][HOLD for payment 2024-03-13] [HOLD for payment 2024-02-20] [$500] [MEDIUM] Distance - Address is duplicated when dragging one point over an empty point[/+]melvin-bot commentedon Mar 6, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Mar 6, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.47-10 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-03-13. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Mar 6, 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:
stephanieelliott commentedon Mar 14, 2024
Summarizing payment on this issue:
Upwork job is here: https://www.upwork.com/jobs/~019049b6059932909e
stephanieelliott commentedon Mar 14, 2024
@parasharrajat bump to complete the BZ checklist please!
parasharrajat commentedon Mar 14, 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:
Regression Test Steps
Do you agree 👍 or 👎 ?
parasharrajat commentedon Mar 14, 2024
@stephanieelliott Done. Please close it when done. I will request it later.
parasharrajat commentedon May 20, 2024
Payment requested as per #33919 (comment)
JmillsExpensify commentedon May 31, 2024
$250 approved for @parasharrajat