Closed m-natarajan closed 1 week ago
Triggered auto assignment to @zanyrenney (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.
To me this looks BE-related if we look at the transaction amounts (see C+ Slack 🧵) being a positive number, considering it should be negative as that's how we store it in BE and since we have logic here, here and other places in FE in order to make it positive.
[!note] If this is BE related, I'd look at the “What do you want to do today?” Modal -> “Manage my team's expenses” flow.
But could also be some mix-up on the FE, not entirely sure 🤔
Thanks for adding these thoughts @ikevin127 !
@zanyrenney Whoops! This issue is 2 days overdue. Let's get this updated quick!
Seeing as this is a BE issue and noone has volunteered for it in slack. I think we should reopen if we encounter this via a real user flow rather than the slightly complex reproduction steps above.
Issue is still reproducible on the latest build 1.4.76-2 Steps: Submitter
https://github.com/Expensify/App/assets/78819774/e76f33be-0243-4fbb-acac-f96aff6f879e
@zanyrenney this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
@zanyrenney Whoops! This issue is 2 days overdue. Let's get this updated quick!
@zanyrenney Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
Been OOO, this reopened whilst I was out.
As it's still reproducible, assigning external.
Job added to Upwork: https://www.upwork.com/jobs/~01cc7f63f52440c4db
Triggered auto assignment to Contributor-plus team member for initial proposal review - @alitoshmatov (External
)
Notice that the report header “Pay with Expensify” green dropdown button shows negative amount like -$7.00. Click on the “Pay with Expensify” green dropdown arrow button and notice that both options are showing negative amount. After clicking on the dropdown arrow button > Select “Pay elsewhere”. Click on the header “Pay elsewhere” button and notice that the “Confirm what to pay” modal also shows negative amount for both options.
We show the displayed amount as the nonHeldAmount
here if the iouReport
has held request and nonHeldAmount
is returned by getNonHeldAndFullAmount
In this function, we always *-1
here without checking the iouReport
is expense report or not. And then because the iou
report has positive amount, the negative amount is displayed.
For here and here we should check if the iouReport
is expense report, we will * -1
otherwise we will * 1
.
NA
@alitoshmatov please can you review the proposal?
@zanyrenney @alitoshmatov this issue is now 4 weeks old, please consider:
Thanks!
@zanyrenney, @alitoshmatov Whoops! This issue is 2 days overdue. Let's get this updated quick!
bump @alitoshmatov please review the proposal?
bumped in open source: https://expensify.slack.com/archives/C01GTK53T8Q/p1718634671704649
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@zanyrenney, @alitoshmatov Still overdue 6 days?! Let's take care of this!
This issue is reproducable without any additional steps. You just need to hold one of the iou transactions and receiving user sees total amount as negative
To expand more I do agree with @ikevin127 's take here
It looks like we are treating expense amount as negative numbers in multiple instances, also this comment indicates the same conclusion.
But this positive amount is working completely fine when using iou normally without holding any transaction.
Before we proceed we should make clear expected values here, @zanyrenney we internal engineer to look at this comments and answer to the following question:
total
and unheldTotal
values positive or negative values?But this positive amount is working completely fine when using iou normally without holding any transaction.
@alitoshmatov Can you review my proposal here . It will explain why the positive amount is not working with holding transaction.
Additional information, the amount value of transaction in expense report will be negative amount and it will be positive amount for iou report.
@zanyrenney, @alitoshmatov Whoops! This issue is 2 days overdue. Let's get this updated quick!
@dominictb Oh I see, I understand now. I confused iou and expense reports with each other. I was focused on 1:1 chats and testing iou
report only. I forgot to test workspace chats where expanse
reports are created.
We can go with @dominictb 's proposal
C+ reviewed 🎀 👀 🎀
Triggered auto assignment to @blimpich, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
📣 @alitoshmatov 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
📣 @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 📖
This confused me for a minute and I had to read through the discussions and look at the code for awhile but it does make sense to me that this is a frontend issue. Appears that we overlooked this particular scenario when implementing the hold functionality for reports.
@blimpich Sorry missed your comment.
Can you elaborate, which part you think we have a problem. Is this the fact that amounts are in negative when in expense reports and positive in iou reports?
Should we pause PR or go on with proposed solution?
Go with the proposed solution, sorry, my comment was worded poorly. When I say "we overlooked" I don't mean you and @dominictb, I mean the original implementors of this code that we are now fixing.
Please proceed forward with the proposed solution.
This issue has not been updated in over 15 days. @blimpich, @zanyrenney, @alitoshmatov, @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!
Did we ever pay out for this issue? @zanyrenney can you make sure we paid for the work done here? I think maybe the automation failed?
The PR was deployed to production on july 16th
We can complete the payment and close the issue
cc: @blimpich @zanyrenney
This issue has not been updated in over 15 days. @blimpich, @zanyrenney, @alitoshmatov, @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!
@blimpich @zanyrenney
Bump
Sorry for the delay @alitoshmatov!
@zanyrenney can we get payment completed and close out this issue soon?
Sure thing @blimpich - on it now.
Payment summary
paid @alitoshmatov $250 via upwork paid @dominictb $250 via upwork.
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.74-4 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: @ikevin127 Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1715813045792699
Action Performed:
Prerequisite : Have one existing account (A) and one newly created account (B)
-$7.00
.Expected Result:
-Report header “Pay with Expensify” green dropdown button shows the amount as positive amount -Clicking on the header “Pay elsewhere” button “Confirm what to pay” modal also shows positive amount for both options.
Actual Result:
-$7.00
.Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence![Screenshot 2024-05-10 at 21 54 05](https://github.com/Expensify/App/assets/38435837/52b7b6b3-379c-43c5-bfc1-9ceed272e304)
https://github.com/Expensify/App/assets/38435837/a9a56919-16d4-4320-b4d8-159d256cc0c5
https://github.com/Expensify/App/assets/38435837/3b939592-6fea-49b7-9310-ae0bd73ce4ab
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @zanyrenney