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-07-24] [$250] Track distance - Incorrect distance is displayed on confirmation page when submitting to WS #42959

Closed
6 tasks done
kavimuru opened this issue Jun 1, 2024 · 32 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

@kavimuru
Copy link

kavimuru commented Jun 1, 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.78-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:

  1. Go to staging.new.expensify.com
  2. Go to self DM.
  3. Track a distance expense.
  4. Go to transaction thread of the distance expense.
  5. Take note of the distance.
  6. Return to the main chat.
  7. Click Share it with my accountant (or categorize it) from actionable whisper.
  8. Proceed to confirmation page.

Expected Result:

The distance in the confirmation page will be the same as the distance in the transaction thread because waypoints remain the same.

Actual Result:

The distance in the confirmation page is different. It shows a very short distance (0.01 km in my case).

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

Bug6498389_1717234236224.bandicam_2024-06-01_17-20-03-316.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01cae0e715bb61699d
  • Upwork Job ID: 1798854040827421683
  • Last Price Increase: 2024-06-13
  • Automatic offers:
    • situchan | Reviewer | 102737223
    • dominictb | Contributor | 102737226
Issue OwnerCurrent Issue Owner: @lschurr
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 1, 2024
Copy link

melvin-bot bot commented Jun 1, 2024

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

@kavimuru
Copy link
Author

kavimuru commented Jun 1, 2024

@lschurr 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.

@kavimuru
Copy link
Author

kavimuru commented Jun 1, 2024

We think this bug might be related to #vip-vsb

@Tony-MK
Copy link
Contributor

Tony-MK commented Jun 1, 2024

I tried reproducing on the current main branch, the distance is displayed correctly.

Main

@kpadmanabhan
Copy link

Same here. Unable to reproduce in main.

@lschurr
Copy link
Contributor

lschurr commented Jun 3, 2024

Going to close since we are unable to reproduce.

@lschurr lschurr closed this as completed Jun 3, 2024
@lanitochka17
Copy link

Issue is still reproducible

bandicam.2024-06-05.12-18-25-884.mp4

@lanitochka17 lanitochka17 reopened this Jun 5, 2024
@lschurr
Copy link
Contributor

lschurr commented Jun 5, 2024

@Tony-MK @kpadmanabhan - Can you try again?

@lschurr lschurr added the External Added to denote the issue can be worked on by a contributor label Jun 6, 2024
Copy link

melvin-bot bot commented Jun 6, 2024

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

@melvin-bot melvin-bot bot changed the title Track distance - Incorrect distance is displayed on confirmation page when submitting to WS [$250] Track distance - Incorrect distance is displayed on confirmation page when submitting to WS Jun 6, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 6, 2024
Copy link

melvin-bot bot commented Jun 6, 2024

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

@lschurr
Copy link
Contributor

lschurr commented Jun 6, 2024

Would you mind testing and confirming this bug is still happening @situchan? A few others weren't able to reproduce.

@situchan
Copy link
Contributor

situchan commented Jun 7, 2024

testing...

@dominictb
Copy link
Contributor

Proposal

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

The distance in the confirmation page is different. It shows a very short distance (0.01 km in my case).

What is the root cause of that problem?

The GetRouteDraft API returns the comment.customUnit.quantity value of meter unit and then we convert this to the current unit to display here.

But after we create the track distance, back-end returns comment.customUnit.quantity value of the current unit. It leads the distance displays the wrong value when we move the transaction from track expense

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

We should convert the distance to meter value here if we're moving the transaction from track expense by the same as we do here

const distance = isMovingTransactionFromTrackExpense && unit ? DistanceRequestUtils.convertToDistanceInMeters(TransactionUtils.getDistance(transaction), unit) : TransactionUtils.getDistance(transaction);

What alternative solutions did you explore? (Optional)

@Tony-MK
Copy link
Contributor

Tony-MK commented Jun 7, 2024

I have tried to reproduce it on the main branch instead of staging but failed.

This is what I got.

Screenshot 2024-06-07 at 12 50 55

@dominictb
Copy link
Contributor

To reproduce this bug, we should enable P2P distance beta.

Copy link

melvin-bot bot commented Jun 10, 2024

@lschurr, @situchan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Jun 10, 2024
@situchan
Copy link
Contributor

reviewing proposal

@melvin-bot melvin-bot bot removed the Overdue label Jun 11, 2024
Copy link

melvin-bot bot commented Jun 13, 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 Jun 13, 2024
@dominictb
Copy link
Contributor

@situchan I think that's expected in back-end that stored the distance value of current unit after we create the distance request. We've been doing that since we got distance from the comment here.

@situchan
Copy link
Contributor

@dominictb's proposal looks good to me.
🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Jun 14, 2024

Triggered auto assignment to @thienlnam, 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 Jun 14, 2024
Copy link

melvin-bot bot commented Jun 14, 2024

📣 @situchan 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Jun 14, 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 📖

Copy link

melvin-bot bot commented Jun 15, 2024

@thienlnam @lschurr @situchan @dominictb 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!

@dominictb
Copy link
Contributor

PR will be ready by a day or two.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jun 17, 2024
@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Jul 10, 2024
Copy link

melvin-bot bot commented Jul 10, 2024

This issue has not been updated in over 15 days. @thienlnam, @lschurr, @situchan, @dominictb eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Monthly KSv2 labels Jul 17, 2024
@melvin-bot melvin-bot bot changed the title [$250] Track distance - Incorrect distance is displayed on confirmation page when submitting to WS [HOLD for payment 2024-07-24] [$250] Track distance - Incorrect distance is displayed on confirmation page when submitting to WS Jul 17, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

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

Copy link

melvin-bot bot commented Jul 17, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.7-8 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-07-24. 🎊

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

Copy link

melvin-bot bot commented Jul 17, 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:

  • [@situchan] The PR that introduced the bug has been identified. Link to the PR:
  • [@situchan] 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:
  • [@situchan] 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:
  • [@situchan] Determine if we should create a regression test for this bug.
  • [@situchan] 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.
  • [@lschurr] 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 Jul 23, 2024
@lschurr
Copy link
Contributor

lschurr commented Jul 24, 2024

Payment summary:

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
Archived in project
Development

No branches or pull requests

8 participants