Skip to content

[HOLD for payment 2024-05-02] Distance - Distance row shows "0.00 miles" instead of "Pending" after changing distance #40712

Closed

Description

@kbecciv

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

Activity

  1. melvin-bot commented on Apr 22, 2024

    @melvin-bot

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

  2. github-actions commented on Apr 22, 2024

    @github-actions
    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.
  3. kbecciv commented on Apr 22, 2024

    @kbecciv
    Author

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

  4. nexarvo commented on Apr 22, 2024

    @nexarvo
    Contributor

    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
  5. mountiny commented on Apr 22, 2024

    @mountiny
    Contributor

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

  6. koko57 commented on Apr 22, 2024

    @koko57
    Contributor

    I can fix this in my next PR

  7. mountiny commented on Apr 22, 2024

    @mountiny
    Contributor

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

  8. koko57 commented on Apr 22, 2024

    @koko57
    Contributor

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

  9. amyevans commented on Apr 22, 2024

    @amyevans
    Contributor

    Perfect, thanks!

  10. koko57 commented on Apr 22, 2024

    @koko57
    Contributor

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

  11. amyevans commented on Apr 24, 2024

    @amyevans
    Contributor

    This got CPed, closing!

  12. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Apr 25, 2024
  13. 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[/+] on Apr 25, 2024
  14. melvin-bot commented on Apr 25, 2024

    @melvin-bot

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

  15. melvin-bot commented on Apr 25, 2024

    @melvin-bot

    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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions