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-05-02] Distance - Distance row shows "0.00 miles" instead of "Pending" after changing distance #40712

Closed
6 tasks done
kbecciv opened this issue Apr 22, 2024 · 13 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Apr 22, 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: 1.4.64-0
Reproducible in staging?: y
Reproducible in production?: n
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create a distance expense.
  4. Go to transaction thread.
  5. Click Distance.
  6. Change the distance and save it.

Expected Result:

Distance row will show "Pending" while the expense is being updated.

Actual Result:

Distance row shows "0.00 miles" while the expense is being updated.

Workaround:

n/a

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

Bug6457564_1713800763066.distance.mp4

View all open jobs on GitHub

@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Apr 22, 2024
Copy link

melvin-bot bot commented Apr 22, 2024

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

Copy link
Contributor

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

@kbecciv
Copy link
Author

kbecciv commented Apr 22, 2024

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

@nexarvo
Copy link
Contributor

nexarvo commented Apr 22, 2024

Proposal

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

Distance row shows "0.00 miles" instead of "Pending" after changing distance

What is the root cause of that problem?

The distanceInMeters is 0 when the API response is pending and there is no check if handle that. So it just show distance as 0.00 here:

if (!hasRoute || !rate || !unit) {
return translate('iou.routePending');
}

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

We can update the condition to handle the pending response logic like:

+ if (!hasRoute || !rate || !unit || distanceInMeters === 0) {
    return translate('iou.routePending');
}

What alternative solutions did you explore? (Optional)

Result

bcc9a239-451e-47a8-b81f-82e894c2237c.mp4

@mountiny
Copy link
Contributor

@koko57 @neil-marcellini this might be related to this PR, can you please have a look? #38543

@koko57
Copy link
Contributor

koko57 commented Apr 22, 2024

I can fix this in my next PR

@mountiny
Copy link
Contributor

@koko57 are you able to expedite that Pr so it can be merged and CPed tomorrow?

@koko57
Copy link
Contributor

koko57 commented Apr 22, 2024

yes, of course - the draft is already ready (#40711), let me just add this fix

@amyevans
Copy link
Contributor

Perfect, thanks!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 labels Apr 22, 2024
@koko57
Copy link
Contributor

koko57 commented Apr 22, 2024

@neil-marcellini @mountiny changes pushed, test steps updated

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Apr 23, 2024
@mountiny mountiny removed the DeployBlockerCash This issue or pull request should block deployment label Apr 23, 2024
@amyevans
Copy link
Contributor

This got CPed, closing!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Apr 25, 2024
@melvin-bot melvin-bot bot changed the title Distance - Distance row shows "0.00 miles" instead of "Pending" after changing distance [HOLD for payment 2024-05-02] Distance - Distance row shows "0.00 miles" instead of "Pending" after changing distance Apr 25, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 25, 2024
Copy link

melvin-bot bot commented Apr 25, 2024

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

Copy link

melvin-bot bot commented Apr 25, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.65-5 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-05-02. 🎊

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

  • @koko57 does not require payment (Contractor)

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 Engineering Weekly KSv2
Projects
None yet
Development

No branches or pull requests

5 participants