-
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
[HOLD for payment 2024-07-24] [$250] [Search v1] Search shows User A submits to User B when User B submits to User A in the same report #44093
Comments
Triggered auto assignment to @johncschuster ( |
@johncschuster 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.Search shows incorrect same What is the root cause of that problem?The following portion till "Outdated ends" is no more applicable because it was fixed with a backend change as mentioned here. Outdated_If the sum of all the IOUs between two users A and B comes to be "User A owes X", all the transactions have same
so from 'B' and to 'A' is same for all transactions.
What changes do you think we should make in order to solve the problem?We should swap the const participantFrom = item.amount > 0 ? item.from : item.to;
const participantTo = item.amount > 0 ? item.to : item.from;
const participantFromDisplayName = item.amount > 0 ? item.formattedFrom : item.formattedTo;
const participantToDisplayName = item.amount > 0 ? item.formattedTo : item.formattedFrom; in App/src/components/SelectionList/Search/TransactionListItemRow.tsx Lines 313 to 321 in b021195
and here Outdated endsNow there is a little frontend change necessary because for the narrower screen we show this App/src/components/SelectionList/Search/TransactionListItemRow.tsx Lines 228 to 232 in b021195
and the from and to values for the whole report is taken as the from and to of the first transaction.App/src/components/SelectionList/Search/ReportListItem.tsx Lines 89 to 95 in 9d88c63
This need not always be true because the first transaction accountID and managerID need not be the same as the accountID and managerID for the whole report.Now that the report sent from backend has managerID and accountID s we can get the participantFrom value from the from or to of the first transaction by comparing the accountID of the report with managerID or accountID of the transaction . We can get participantTo similarly.
What alternative solutions did you explore? (Optional) |
Job added to Upwork: https://www.upwork.com/jobs/~01bc65eaf7cfc97061 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @brunovjk ( |
That is how the backend sends the response for Search page @brunovjk |
I see, @c3024 can/should we fix it there? 1. I tested your solution and works: Sorry, but it seems like a workaround, don't you think? 2. When we reduce the screen, the This title also changes depending on "who owes less". Do you think we should update this as well? Maybe always show the name of the logged in user first, and in the total amount indicate "who owes who", as stated in the issue description. 3. Lastly, in the issue description it says: Thanks. |
I think a backend fix needs to be coupled with some frontend changes as well because for the narrow layout we are just taking the first transactions App/src/components/SelectionList/Search/ReportListItem.tsx Lines 89 to 90 in 67f92c6
If we were to send the transactions I don't think the solution I suggested is a workaround. 😆
I think this is consistent with individual rows in the wider screen so in my opinion this is fine. I don't think negative values would look good here. You might want to tag the design team if you think swapping the user positions would be better.
I think this is clear enough. The Total field is the net amount (with the one who submitted more expense value or who owes less) on the left or You can make a comment with the |
This comment was marked as outdated.
This comment was marked as outdated.
Triggered auto assignment to @cristipaval, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@cristipaval please take a look at my last comment. I tagged you to confirm a few things before approving the proposal. We need to fix:
For the first point @c3024 's proposal works well, still, I wonder if a backend/frontend solution might better resolve the root cause. Thank you! |
@luacmartins I think you have more knowledge around Search functionality. Could you have a look at this one or maybe take it over? 👀 |
I agree that we need to implement some backend fixes for this. I can work on that. |
Will you change the individual transactions' |
I'm flipping the |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.5-13 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-17. 🎊 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:
|
@luacmartins should we wait to fix #45013 to proceed with payment/closing here? Thanks. |
Sure, let's do that |
Hey, @brunovjk / @luacmartins, can you help me clarify the path forward for payment? It sounds like we're going to wait to pay out this issue (#44093) until #45013 is completed. Have I understood that correctly? |
@luacmartins would you mind clarifying this? Thank you. |
@johncschuster correct, we're waiting for this PR to hit production and start the countdown on the 7 day regression period. We can update the payment date once that PR is deployed to prod. I also left a comment on this issue so we don't double pay. |
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.6-8 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-22. 🎊 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:
|
Awesome. Thanks for clarifying, @luacmartins! I'll be standing by for payment 👍 |
Looks like the linked PR just hit prod. Payment should be issued on July 24 assuming no regressions. |
No regressions so far. We're still on track to pay this out on the 24th 👍 |
Regression Test Proposal
Do we agree 👍 or 👎 |
Payment has been issued! Thanks for your contributions! |
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.86-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/4647855
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
From and To field for the expense submitted by User B will show User B in From field and User A in To field
Actual Result:
From and To field for the expense submitted by User B will show User A in From field and User B in To field, when it is submitted from User B and User A
The Total field also does not make sense either. The amount sent by User A should be indicated by a negative or better indication so that the total amount correctly reflects the sum of both expenses
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6519453_1718891782532.bandicam_2024-06-20_21-49-16-902.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @johncschusterThe text was updated successfully, but these errors were encountered: