-
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
[HOLD for payment 2024-07-10] [$250] Search - Total amount for the report in Shared is -0.00 when it has only scanning expenses #43990
Comments
Triggered auto assignment to @mallenexpensify ( |
We think this issue might be related to the #collect project. |
Job added to Upwork: https://www.upwork.com/jobs/~0122d04513e0a42253 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @c3024 ( |
@c3024 likely add |
ProposalPlease re-state the problem that we are trying to solve in this issue.The total amount for the report in Shared is -0.00. What is the root cause of that problem?In
-1 if it's an expense, even when the value is 0.
What changes do you think we should make in order to solve the problem?Only multiply if
After that
This can be made an utility to ensure consistency in this logic. What alternative solutions did you explore? (Optional)If value is -0, convert it to 0 inside Example:
|
Proposal updated to add alternative solution |
ProposalPlease re-state the problem that we are trying to solve in this issue.The total amount for the report in Shared is -0.00. What is the root cause of that problem?In
indeed as nkdengineer stated you always multiply with -1 if it's an expense, even when the value is 0. -1 * 0 will be -0, so it's displayed as -0 in front-end. What changes do you think we should make in order to solve the problem?add 0 to the overall amount, the issue is hardcoded in javascript itself !!! the line 42 will then be text={CurrencyUtils.convertToDisplayString((reportItem?.type === CONST.REPORT.TYPE.EXPENSE ? -1 : 1) * (reportItem?.total ?? 0) + 0, reportItem?.currency)} What alternative solutions did you explore? (Optional)Even better avoid such mutiplication by writing line 42 as text={(reportItem?.type === CONST.REPORT.TYPE.EXPENSE ? "-" : "") + CurrencyUtils.convertToDisplayString((reportItem?.total ?? 0), reportItem?.currency)} |
📣 @iloveyourglasses! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
@nkdengineer 's proposal here looks good to me. I found this use case at only one place so the primary solution looks fine to me. 🎀 👀 🎀 C+ Reviewed |
Triggered auto assignment to @arosiclair, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @c3024 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-7 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-10. 🎊 For reference, here are some details about the assignees on this issue:
|
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:
|
Contributor: @nkdengineer paid $250 via Upwork @c3024 , please fill out the BZ checklist above. Thx |
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:
Regression test proposal
|
@arosiclair, @mallenexpensify, @c3024, @nkdengineer Huh... This is 4 days overdue. Who can take care of this? |
@arosiclair, @mallenexpensify, @c3024, @nkdengineer Still overdue 6 days?! Let's take care of this! |
@mallenexpensify is this done? |
it is now! |
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.85-6
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/4609426
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team
Action Performed:
Expected Result:
The total amount for the report in Shared will be 0.00.
Actual Result:
The total amount for the report in Shared is -0.00.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
20240619_171945.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mallenexpensifyThe text was updated successfully, but these errors were encountered: