-
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
[$500] IOU - A "-" sign appears in front of the currency in the Distance IOU preview #33489
Comments
Job added to Upwork: https://www.upwork.com/jobs/~019f65c5024fc15f72 |
Triggered auto assignment to @anmurali ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.When creating a new distance request, we can see the amount is negative. What is the root cause of that problem?When creating a new distance request, we optimistically create a new transaction with a negative amount. Lines 656 to 657 in 862b0ea
Then, the amount shown will be negated and we should see a positive value. App/src/libs/TransactionUtils.ts Lines 259 to 269 in 862b0ea
However, every time we create a new request, we merge the optimistic transaction with the negative amount with the transaction draft that always has a positive amount. Lines 682 to 688 in 862b0ea
That's why we see the negative amount. (this is the regression from #32943) What changes do you think we should make in order to solve the problem?Prevent the optimistic amount from being overwritten by the draft amount. We can set the amount specifically to be the optimistic amount.
(or just omit it from the draft transaction) What alternative solutions did you explore? (Optional)Instead of merging all data from the draft transaction, we could just pick some data that is missing from the optimistic transaction, such as |
ProposalPlease re-state the problem that we are trying to solve in this issue.When creating a Remote IOU, before the map is loaded in the preview, a "-" appears in front of the currency What is the root cause of that problem?In here, the amount of What changes do you think we should make in order to solve the problem?The transaction amount might be stored as negative, but it's only for back-end tracking purpose so we shouldn't convert the signs around in client side. We should:
With these changes, we eradicate the confusing negating logic in the codebase while still have the proper displaying logic where if the back-end stores it as negative for tracking purpose, we'll still show it correctly as positive in client side. This is similar to what's already done for IOU requests. What alternative solutions did you explore? (Optional)NA |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Issue not reproducible during KI retests. (First week) |
Closed, cannot reproduce |
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.15-1
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:
Expected Result:
No unnecessary characters should appear in the preview of the distance IOU
Actual Result:
When creating a Remote IOU, before the map is loaded in the preview, a "-" appears in front of the currency
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6323686_1703233040730.Recording__963.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: