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-08-09] [$250] Distance - Error is not dismissed after entering valid waypoints #44459

Closed
1 of 6 tasks
lanitochka17 opened this issue Jun 26, 2024 · 38 comments
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 Jun 26, 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.2-0
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/4671219
Issue reported by: Applause - Internal Team

Action Performed:

  1. Disable internet connection
  2. Go to FAB > Submit expense
  3. Select the Distance option
  4. Enter an invalid start location
  5. Enter an invalid finish location
  6. Submit the expense to a workspace
  7. Enable the internet connection
  8. Wait for the error on the request to appear
  9. Click on the request
  10. Click on the address input field and type valid waypoints on the start and finish locations respectively.
  11. Save the new addresses

Expected Result:

The error is removed and the map updates to the new addresses and displays correctly in the map thumbnail

Actual Result:

The error persists, the map thumbnail is empty and the new addresses are displayed only when the thumbnail is clicked

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

Bug6525202_1719405397967.2024-06-26_15_16_58.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0138e762430a2e3f57
  • Upwork Job ID: 1810948702952984302
  • Last Price Increase: 2024-07-24
  • Automatic offers:
    • dominictb | Contributor | 103283503
Issue OwnerCurrent Issue Owner: @dylanexpensify
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 26, 2024
Copy link

melvin-bot bot commented Jun 26, 2024

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

@dylanexpensify 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-collect - Release 1

@melvin-bot melvin-bot bot added the Overdue label Jun 28, 2024
Copy link

melvin-bot bot commented Jul 1, 2024

@dylanexpensify Eep! 4 days overdue now. Issues have feelings too...

@dylanexpensify
Copy link
Contributor

@lanitochka17 cannot reproduce, can you confirm this is still occurring?

@melvin-bot melvin-bot bot removed the Overdue label Jul 3, 2024
@lanitochka17
Copy link
Author

Issue is still reproducible

2024-07-05.21.19.57.mp4

@melvin-bot melvin-bot bot added the Overdue label Jul 5, 2024
Copy link

melvin-bot bot commented Jul 8, 2024

@dylanexpensify Eep! 4 days overdue now. Issues have feelings too...

@dylanexpensify dylanexpensify added the External Added to denote the issue can be worked on by a contributor label Jul 10, 2024
Copy link

melvin-bot bot commented Jul 10, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0138e762430a2e3f57

@melvin-bot melvin-bot bot changed the title Distance - Error is not dismissed after entering valid waypoints [$250] Distance - Error is not dismissed after entering valid waypoints Jul 10, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 10, 2024
Copy link

melvin-bot bot commented Jul 10, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Jul 10, 2024
@dylanexpensify
Copy link
Contributor

Moving external!

@dominictb
Copy link
Contributor

dominictb commented Jul 10, 2024

Proposal

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

The error persists, the map thumbnail is empty and the new addresses are displayed only when the thumbnail is clicked

What is the root cause of that problem?

When the distance is invalid, the request failed to be created. In this case we're still allowing users to edit the money request, which will never work because there's no money request in the back-end to edit.

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

Update canEditFieldOfMoneyRequest here to early return if the transaction has pendingAction: "add" and there's errors (or errorFields). It means the transaction failed to be created in the back-end so we should disable users from editing. The user can dismiss the transaction error and try again. The transaction is here, we can move on top of the method and use it. Using getLinkedTransaction can also be ok.

canEditMoneyRequest here should also be fixed like that.

If there're fields that are not restricted by canEditFieldOfMoneyRequest or canEditMoneyRequest, we can create an util isRequestCreationFailed with the described logic and use it to make the menu item not interactive, not show right icon, ... Also deeplinks should be checked too, to make sure to show correct not found page/other UX if the field is not editable. We can handle this in PR phase.

There could be small variations in the fix for other types of Expenses (Track, Invoice, ...) we will check and make sure it works for all of them

What alternative solutions did you explore? (Optional)

Out of scope but it looks like the x button to clear the error and the transaction is not working entirely as expected. It's not navigating the user back to the correct chat after clearing the error.

Root cause is in deleteTransaction we're not doing the navigation. To fix we need to update this to something like

const routeToNavigateAfterDeletion = IOU.deleteMoneyRequest(iouTransactionID, parentReportAction, true);
ReportUtils.navigateBackAfterDeleteTransaction(routeToNavigateAfterDeletion);

And this to check !isEmptyObject(transaction?.errors)
It also should be decided in case the distance request is created in an optimistic chat report, whether we need to clear that optimistic chat report. If so, clearAllRelatedReportActionErrors needs to be updated to clear the optimistic chat report too.

@dominictb
Copy link
Contributor

Proposal updated

Copy link

melvin-bot bot commented Jul 10, 2024

@Ollyws @dylanexpensify this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@Ollyws
Copy link
Contributor

Ollyws commented Jul 15, 2024

Will get to this one today.

@dylanexpensify
Copy link
Contributor

dylanexpensify commented Jul 15, 2024 via email

@Ollyws
Copy link
Contributor

Ollyws commented Jul 15, 2024

On the latest main I'm getting a loop of GetRoute when coming back online and trying to edit the waypoints, rendering them uneditable. @dominictb Is this occuring for you too?

Screen.Recording.2024-07-15.at.17.47.25.mov

Copy link

melvin-bot bot commented Jul 17, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Jul 17, 2024
@neil-marcellini
Copy link
Contributor

Yeah I suppose it is congruent with the other behaviour in the app. Ok let's go with @dominictb's proposal. 🎀👀🎀 C+ reviewed

I agree, great plan! Hiring. For context, we recently fixed cleaning up errored distance expenses on the frontend. Maybe there were some mistakes in there that we could smooth out here too.

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

melvin-bot bot commented Jul 26, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Jul 26, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 Weekly KSv2 labels Jul 28, 2024
@melvin-bot melvin-bot bot changed the title [$250] Distance - Error is not dismissed after entering valid waypoints [HOLD for payment 2024-08-09] [$250] Distance - Error is not dismissed after entering valid waypoints Aug 2, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 2, 2024
Copy link

melvin-bot bot commented Aug 2, 2024

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

Copy link

melvin-bot bot commented Aug 2, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.15-9 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-08-09. 🎊

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

Copy link

melvin-bot bot commented Aug 2, 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:

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

@dylanexpensify
Copy link
Contributor

Payment coming up!

@Ollyws
Copy link
Contributor

Ollyws commented Aug 8, 2024

BugZero Checklist:

  • The PR that introduced the bug has been identified. Link to the PR:

I don't think we can pin this on any (front-end) PR, it was just never updated on the front-end after the backend error was implemented.

  • 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:

N/A

  • 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:

N/A

  • Determine if we should create a regression test for this bug.

Yes

  • 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

1. Disable internet connection
2. Go to FAB > Submit expense
3. Select the Distance option
4. Enter an invalid start location
5. Enter an invalid finish location
6. Submit the expense to a workspace
7. Enable the internet connection
8. Wait for the error on the request to appear
9. Click on X icon to clear the error

Do we agree 👍 or 👎

@Ollyws
Copy link
Contributor

Ollyws commented Aug 8, 2024

Requested in ND.

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Aug 8, 2024
@JmillsExpensify
Copy link

@dylanexpensify i need a payment summary

@dylanexpensify
Copy link
Contributor

Payment summary:

Please apply/request!

@melvin-bot melvin-bot bot removed the Overdue label Aug 9, 2024
@dylanexpensify
Copy link
Contributor

Done!

@JmillsExpensify
Copy link

$250 approved for @Ollyws

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
No open projects
Status: Done
Development

No branches or pull requests

6 participants