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

[C+ checklist requires completion] [$500] Distance Expense - No red dot in chat (LHN) or expense preview when invalid waypoints are used #29954

Closed
5 of 6 tasks
izarutskaya opened this issue Oct 19, 2023 · 31 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 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Oct 19, 2023

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: 1.3.86-1

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:

Offline mode:

  1. Launch the app.
  2. Navigate to Global Create > Request Money.
  3. Select the ''Distance'' option.
  4. Disable the internet connection.
  5. Enter an invalid start location.
  6. Enter an invalid finish location.
  7. Tap on ''Next''.
  8. Choose a workspace from the list.

Online mode:

  1. Enable the internet connection
  2. Go to workspace chat, verify the distance expense preview
  3. Go to LHN and verify the workspace chat

Expected Result:

A red dot appears in workspace chat (LHN) and on the expense preview after creating an expense with invalid waypoints.

Actual Result:

A red dot doesn't appear in workspace chat (LHN) or on the expense preview after creating an expense with invalid waypoints.

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

Android: Native
Android: mWeb Chrome
iOS: Native
Bug6242367_1697671042923.No_red_dot_in_chat_and_chat_preview__LHN_.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01db8a056567f7d682
  • Upwork Job ID: 1714950822453010432
  • Last Price Increase: 2023-10-19
@izarutskaya izarutskaya added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 19, 2023
@melvin-bot melvin-bot bot changed the title Distance Expense - No red dot in chat (LHN) or expense preview when invalid waypoints are used [$500] Distance Expense - No red dot in chat (LHN) or expense preview when invalid waypoints are used Oct 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 2023

Triggered auto assignment to @greg-schroeder (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 2023

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

@dukenv0307
Copy link
Contributor

Proposal

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

Distance Expense - No red dot in chat (LHN) or expense preview when invalid waypoints are used

What is the root cause of that problem?

When we use the invalid waypoints to create a new request, BE will return the error. But we don't set the error for report preview action in failureData and then no red dot in LHN and we cannot remove the invalid repreview.

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

We should generate the error for report preview action in failure data

{
    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${chatReport.reportID}`,
    value: {
        ...(isNewChatReport
            ? {
                  [chatCreatedAction.reportActionID]: {
                      errors: ErrorUtils.getMicroSecondOnyxError('iou.error.genericCreateFailureMessage'),
                  },
                  [reportPreviewAction.reportActionID]: {
                     errors: ErrorUtils.getMicroSecondOnyxError('iou.error.genericCreateFailureMessage'),
                  },
              }
            : {
                  [reportPreviewAction.reportActionID]: {
                    errors: ErrorUtils.getMicroSecondOnyxError('iou.error.genericCreateFailureMessage'),
                  },
              }),
    },
},

key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${chatReport.reportID}`,

What alternative solutions did you explore? (Optional)

NA

Result

Screencast.from.19-10-2023.17.47.03.webm

@brunovjk
Copy link
Contributor

brunovjk commented Oct 19, 2023

@dukenv0307 I believe there are other problems related to waypoint validation, do you think we can change your solution to cover more scenarios? Makes sense? There are other PRs about this

@melvin-bot melvin-bot bot added the Overdue label Oct 23, 2023
@greg-schroeder
Copy link
Contributor

Awaiting proposal review

@melvin-bot melvin-bot bot removed the Overdue label Oct 23, 2023
@burczu
Copy link
Contributor

burczu commented Oct 24, 2023

@dukenv0307 What do you think about this comment?

P.S. I've checked your proposal and indeed it does fix the issue.

@dukenv0307
Copy link
Contributor

@burczu I think we cannot validate the waypoint in offline mode. So I think added the error in failureData is the solution here.

@burczu
Copy link
Contributor

burczu commented Oct 24, 2023

@dukenv0307 I think the question asked by @brunovjk is if this issue can potentially fix other issues listed by them.

@dukenv0307
Copy link
Contributor

@burczu I clicked on the link issue from this comment above but seems like it's an invalid link.

@burczu
Copy link
Contributor

burczu commented Oct 24, 2023

@dukenv0307
Copy link
Contributor

I open the link and it doesn't open any issue

Screen.Recording.2023-10-24.at.17.39.36.mov

@burczu
Copy link
Contributor

burczu commented Oct 24, 2023

It's correct - it opens the list of issues that potentially could be related (please check the filter that is applied).

@dukenv0307
Copy link
Contributor

Yeah, I saw that. So what is the related issue?

@burczu
Copy link
Contributor

burczu commented Oct 24, 2023

I think this is the question to you to tell us if you think something on the list may be related :)

@dukenv0307
Copy link
Contributor

I saw the list and I think no issue in the list is related to this issue. Other issues have the different root cause.

@burczu
Copy link
Contributor

burczu commented Oct 24, 2023

Yeah, I've just checked the list too and I agree.

So, I think we the proposal from @dukenv0307 is what we can proceed with.

🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Oct 24, 2023

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 26, 2023
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 27, 2023
@dukenv0307
Copy link
Contributor

@burczu The PR is ready for review.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 2, 2023
@melvin-bot melvin-bot bot changed the title [$500] Distance Expense - No red dot in chat (LHN) or expense preview when invalid waypoints are used [HOLD for payment 2023-11-09] [$500] Distance Expense - No red dot in chat (LHN) or expense preview when invalid waypoints are used Nov 2, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 2, 2023
Copy link

melvin-bot bot commented Nov 2, 2023

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

Copy link

melvin-bot bot commented Nov 2, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.94-2 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 2023-11-09. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

Copy link

melvin-bot bot commented Nov 2, 2023

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:

  • [@burczu] The PR that introduced the bug has been identified. Link to the PR:
  • [@burczu] 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:
  • [@burczu] 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:
  • [@burczu] Determine if we should create a regression test for this bug.
  • [@burczu] 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 Daily KSv2 and removed Weekly KSv2 labels Nov 8, 2023
@greg-schroeder
Copy link
Contributor

Processing

@greg-schroeder
Copy link
Contributor

Offer sent to @dukenv0307

@greg-schroeder greg-schroeder changed the title [HOLD for payment 2023-11-09] [$500] Distance Expense - No red dot in chat (LHN) or expense preview when invalid waypoints are used [C+ checklist requires completion] [$500] Distance Expense - No red dot in chat (LHN) or expense preview when invalid waypoints are used Nov 9, 2023
@greg-schroeder
Copy link
Contributor

All that's left is checklist by @burczu

Copy link

melvin-bot bot commented Nov 9, 2023

@pecanoro @burczu @greg-schroeder @dukenv0307 this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

@greg-schroeder
Copy link
Contributor

bump @burczu

@burczu
Copy link
Contributor

burczu commented Nov 14, 2023

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:

  • [@burczu] The PR that introduced the bug has been identified. Link to the PR:

#18423

  • [@burczu] 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:

#18423 (comment)

  • [@burczu] 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:

Didn't find any

  • [@burczu] Determine if we should create a regression test for this bug.

As this issue occurs only while the App in offline mode, I tend to believe this is not very common case and we don't necessary need regression test for this.

  • [@burczu] 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:

@greg-schroeder
Copy link
Contributor

Thanks @burczu!

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 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

6 participants