-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 - Rate on confirmation page shows 3 decimal value for a 4-digit decimal value rate #49929
Comments
Triggered auto assignment to @kadiealexander ( |
@kadiealexander 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 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Distance - Rate on confirmation page shows 3 decimal value for a 4-digit decimal value rate What is the root cause of that problem?Right here the Rate Decimal for displaying Rate is 3 which is wrong Line 2402 in 0e3b82c
And same here Line 148 in decf515
What changes do you think we should make in order to solve the problem?We should change it to 4 ResultScreen.Recording.2024-09-30.at.07.00.01.movWhat alternative solutions did you explore? (Optional) |
i think this is caused by this PR |
ProposalPlease re-state the problem that we are trying to solve in this issue.We have an inconsistency in the number of decimal places for the distance rate. What is the root cause of that problem?In this PR #49773, we decided to always display 4 decimals for all currencies. But we haven't updated this function What changes do you think we should make in order to solve the problem?Update to display 4 decimals Line 149 in 69483ff
Line 122 in 69483ff
I see one more edge case when rate is 166.9800 (There are some zeros in the end), should we display zeros? Currently, we also display inconsistency in this case
Line 152 in 69483ff
Remove
Line 167 in 69483ff
Another problem in the update rate message, the rate only display 2 decimals. But this data is get from originalMessage. If we want to update it, we need to fix on the BE side or make a workaround on FE (detail later if needed) What alternative solutions did you explore? (Optional) |
📣 @thelullabyy! 📣
|
|
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
Job added to Upwork: https://www.upwork.com/jobs/~021841311378926667676 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
This seems like a regression from #49773. cc: @DylanDylann @daledah |
@parasharrajat Hmm, In #49773, we decided to mirror the Olddot behavior and always use a 4-digit decimal on the rate value. About this bug, I think this is a new requirement for the update distance rate on the request money flow to use of 4-digit decimals, because this issue also happens on the Olddot Screen.Recording.2024-10-03.at.10.59.06.mov |
I just glanced at proposals and noticed that @thelullabyy mentioned a valuable point
|
Ok. thanks for the input. let me review the proposals in that case. |
Edited by proposal-police: This proposal was edited at 2024-10-05 23:59:46 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Rate on confirmation page shows 3 decimal value for a 4-digit decimal value rate What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
check this videoparameter: currency- ALL, rate-0.6799, distance-74.59mil, from New York to New Jersey.Screen.Recording.2024-10-06.at.5.07.35.AM.mov
To solve this problem we need to start rounding off amount on IOUStepAmount instead of ripping of the digits after decimal point. setNewAmount(Number(currentAmount).toFixed());
And some cleanup. And need some additional changes from BE, the generated message when changing distance rate only has 3 decimal places so BE now need to return amount with 4 decimal places.
What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
@parasharrajat, @kadiealexander Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@parasharrajat bump on the reviews! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Because this problem is about the display of currency, I like @thelullabyy's proposal. They picked a few related cases to this issue. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @puneetlath, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @thelullabyy You have been assigned to this job! |
Here in my Proposal I have mentioned an additional problem which will arise afterwards , If you think that issue is out of scope here, then we could raise a new issue for the same. Otherwise I request you to assign this issue to me or at least let me and @thelullabyy work here collaboratively. Thank you. cc. @puneetlath |
@puneetlath @parasharrajat @kadiealexander @thelullabyy 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! |
@thelullabyy could you please provide an update here? Thank you! |
@kadiealexander I'll open a PR soon. |
@parasharrajat This PR is ready for review. |
I can take this as C+ ) if this is critical while @parasharrajat is OOO until Oct 25 |
@allgandalf are you ok with splitting the C+ bounty since @parasharrajat already did the proposal review? If so, please go ahead. |
yeah no worries at all, thanks |
📣 @allgandalf 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@puneetlath can you take a look here once you find time, thanks :) |
Looks like @allgandalf took it. I can continue reviewing this if needed. |
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: 9.0.41-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
In Step 10, the rate list should show the complete decimal value (eg, 1.2345)
Actual Result:
In Step 10, the rate list only shows 3 decimal value (eg, 1.234)
In Step 13, the expense preview and distance receipt shows 4 decimal value which is the complete rate (eg, 1.2345)
The rate format is not consistent in the rate list and distance receipt
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6618594_1727539618646.20240929_000027.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: