-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$250] Distance - Inconsistency in showing unit in preview and transaction thread after updating unit #43588
Comments
Triggered auto assignment to @jliexpensify ( |
@jliexpensify 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 |
We think that this bug might be related to #wave-collect - Release 1 |
@lanitochka17 is this only happening on Chrome? |
Job added to Upwork: https://www.upwork.com/jobs/~014c60d0efed5e27db |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt ( |
Edited by proposal-police: This proposal was edited at 2024-08-12 08:14:20 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.In Step 8, thenew unit is applied in Distance and Rate rows in transaction thread What is the root cause of that problem?
App/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx Line 88 in fb323f6
That is the inconsistency. What changes do you think we should make in order to solve the problem?Both distance display in transaction thread report and money request preview are wrong. The one has wrong distance value with current unit, the other has wrong unit and distance value isn't converted. For two cases, we should display the distance with the current unit of the WS and the convert distance value with this unit.
App/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx Line 88 in fb323f6
To do that we can create a util to get the display distance of the distance request. In this function, we will get the unit of transaction via the What alternative solutions did you explore? (Optional)For the distance from WS, we should get the unit via
Or BE should store the unit in |
@jliexpensify Reproducible in all environment. |
I was not able to reproduce this. The money request info stayed the same (with old unit) which I think is the correct behaviour otherwise the amount will have to change. @nkdengineer Is this still reproducible for you? |
@s77rt I can reproduce this issue. Are you enable the P2PDistance beta, it's required to reproduce this bug. |
@nkdengineer I was able to reproduce after enabling the beta 👍 I think we should hold this on #36987 cc @jliexpensify |
Thanks, have adjusted the issue! |
The decision here is that we don't really care about fixing this for existing distance transactions, as there could be millions of those to update and given that the bug exists on OldDot and hasn't been seeming to bother people it's not really worth fixing historically. I will work on PRs to start saving and using the transaction distance unit, and if it's unavailable we'll fallback to the current method 🤷♂️. I hope to get started sometime this week. |
Cool I got it saving for creating requests. I'll add tests for editing next, and then also any places where it's read in Web-E. For example I should test the exact steps of this issue, verifying the merchant is unchanged when the policy unit changes. |
Just a heads up I'm OOO from 3rd to 14th, but I don't think anything is needed from me during this period. Feel free to reassign to another B0 if needed though! |
I got the bug fixed and working well with and without the beta. I still need to do some fixes for when the rate is updated, and I should check that this works for tracked distance expenses and splits too. |
I just realized that I also need to fix this for distance expenses created from Expensify classic. The current PRs only relate to New Expensify. I think it's fine to make the update for the old and new platforms separately because the distanceUnit is currently not stored at all, so it's fine if new is storing it and old isn't for a little while. That will keep the PRs focused. I'm noting this so I don't forget to update for classic. |
I made a few more changes on the App PR from review feedback and I'm ready for another C+ review. |
@jliexpensify this is on prod now, next step is payment. |
PAYMENT SUMMARY
|
Yes 👍 |
Any checklist needed @s77rt? |
@jliexpensify I don't think that's needed here given that this bug comes from a new feature that's still in beta. As for the regression test(s) they will be added at once #23291 https://github.com/Expensify/Expensify/issues/437283 |
Awesome, thanks! I'll close this out but here is the linked Payment Summary for your payment @s77rt |
$250 approved for @s77rt |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.82-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/4621218
Issue reported by: Applause - Internal Team
Action Performed:
Precondition:
Expected Result:
There should be consistency in showing updated distance unit in transaction thread and preview in expense report
Actual Result:
In Step 8, thenew unit is applied in Distance and Rate rows in transaction thread
In Step 9, transaction thread header shows the previous unit
In Step 10, the expense preview also shows the previous unit
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6510280_1718170765275.bandicam_2024-06-12_13-26-43-493.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @jliexpensifyThe text was updated successfully, but these errors were encountered: