-
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
[$1000] "Owes you" message shows up in the search page after searching for a contact after settling a money request #19370
Comments
Triggered auto assignment to @kevinksullivan ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.We want the proper user email/name to show up in search suggestions and hide the "owes you" message from user name if there is any What is the root cause of that problem?In ReportUtils.getMoneyRequestReportName we are adding the owns you message. In some cases it is needed like for displaying in LHN but not in the case of search. What changes do you think we should make in order to solve the problem?We have to conditionally display the "owes you" message for results that need it. We can pass a prop function getMoneyRequestReportName(report, shouldExcludeFormattedAmount = false) {
const payerName = isExpenseReport(report) ? getPolicyName(report) : getDisplayNameForParticipant(report.managerEmail);
if (shouldExcludeFormattedAmount) {
return payerName
}
const formattedAmount = CurrencyUtils.convertToDisplayString(getMoneyRequestTotal(report), report.currency);
return Localize.translateLocal('iou.payerOwesAmount', { payer: payerName, amount: formattedAmount });
} This prop will come from SearchPage.js#L61 -> OptionsListUtils.js#L772 -> OptionsListUtils.js#L533 -> OptionsListUtils.js#L366 -> ReportUtils.js#L1081 -> ReportUtils.js#L1055 What alternative solutions did you explore? (Optional)We can return the payer name directly (in case of money request report) in a function higher up the hierarchy instead of drilling a prop like this. |
ProposalPlease re-state the problem that we are trying to solve in this issue.After settling a money request, the 'owes you' message shows up in the search page What is the root cause of that problem?As explained by @huzaifa-99 , this is happening because the option data coming from recent reports are being added with the owe message. What changes do you think we should make in order to solve the problem?We can modify the - const recentReportsWithoutSelected = _.filter(this.state.recentReports, ({login}) => !filterText.includes(login));
+ let recentReportsWithoutSelected = _.filter(this.state.recentReports, ({login}) => !filterText.includes(login));
+ recentReportsWithoutSelected = recentReportsWithoutSelected.map(report => ({
+ ...report,
+ text: ReportUtils.getDisplayNameForParticipant(report.login)
+ })) What alternative solutions did you explore? (Optional)We could consider adding a
ResultWorking well after the fix screen-recording-2023-05-22-at-170532_MdNrIwGx.mp4 |
ProposalPlease re-state the problem that we are trying to solve in this issue.When we search for a user, the new chat list will only show the money request report. What is the root cause of that problem?The new chat list shows the 5 most recent report and all user, except the user that already shown in the most recent by checking the Every money request will create a new report (assuming we don't have one) and it's also included in the list and the App/src/libs/OptionsListUtils.js Lines 680 to 683 in c917c44
Then, when we are trying to include users into the new chat list, we will skip if the user App/src/libs/OptionsListUtils.js Lines 688 to 692 in c917c44
So, we can only see the money request report in the new chat, but not the user report. What changes do you think we should make in order to solve the problem?We shouldn't push the money request report to the exclude list here: App/src/libs/OptionsListUtils.js Lines 680 to 683 in c917c44
In addition to check if
Additionally, I think it's intentional to have money request report in new chat or search page, but I think it's not expected to have money request report in new group/money request participants page (or maybe there are other page too). So, to further improve this, we can exclude money request report from the list just for some page. We can do same thing like this where we will pass App/src/libs/OptionsListUtils.js Lines 593 to 609 in c917c44
Screen.Recording.2023-05-22.at.19.13.03.mov |
Job added to Upwork: https://www.upwork.com/jobs/~018b1abad8b1af373d |
Current assignee @kevinksullivan is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel ( |
Triggered auto assignment to @alex-mechler ( |
Hm shouldn't be overdue, this just got to Alex yesterday. |
@Santhosh-Sellavel there is a bunch of proposals in here to review when you get a chance |
Yeah, I got that on my list today! |
@alex-mechler After looking at proposals, we need to confirm what the issue & what's expected here.
|
I'm going to defer to @kevinksullivan on those, I'm not sure what the intended behavior should be, but my thoughts are below
I think in the LHN this isnt a problem, since its what was happening in the transaction
I think this is correct, or at least we should show them in addition to the user. We should still be showing the User who was entered |
Putting in slack to make sure I understand what we're discussing |
sorry for the delay, but this is not reproducible and was already fixed. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
User B should show up.
Actual Result:
"Owes you" message shows up and doesn't show account B
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.16.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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
2023-05-18.11.51.04.mp4
Recording.708.mp4
Expensify/Expensify Issue URL:
Issue reported by: @Nathan-Mulugeta
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1684400092434069
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: