You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-10-29] [$250] Submit Expense - Contacts section is missing participants #48114
@kadiealexander 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
Edited by proposal-police: This proposal was edited at 2024-08-28 06:51:06 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Search list when submitting expense, doesn't display contacts section
What is the root cause of that problem?
When submitting an expense, if there is no chat history with a contact in the contact list, it will be included in the Contacts section. However, if there is chat history, it will be included in recentReports or just Chats. The issue is that recentReports is limited to a maximum of 5 recent reports (because of the slice and splice in below code), causing the remaining reports to be discarded:
As a result, it seems that some contacts are missing, and many reports are not displayed due to this filtering (slice / splice).
What changes do you think we should make in order to solve the problem?
We could store the remaining reports from recentReports into a separate olderReports (or another name) data and return it to the caller in MoneyRequestParticipantsSelector (must check other caller if necessary).
include the olderReports data. The sketch code changes could be something like this. We must also check other usage of filterOptions and adjust the code accordingly. and If we want to re-order the olderReports by other criteria (other than date), we can adjust it there.
What alternative solutions did you explore? (Optional)
The alternative solution is to retrieve DM reports from older or discarded reports and include them in the contact list.
changed the title [-]Submit Expense - Search list when submitting expense, doesn´t display the contacts section[/-][+][$250] Submit Expense - Search list when submitting expense, doesn´t display the contacts section[/+]on Aug 30, 2024
[@eh2077] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
[@eh2077] Determine if we should create a regression test for this bug. Yes
Regression test
Sign up for a new account on staging.new.expensify.com
Create DMs with 7 new contacts
Go to Global Create > Submit Expense
Enter an amount and click Next
Verify that all participants can be found in the Contacts section or the Recents section.
Activity
melvin-bot commentedon Aug 27, 2024
Triggered auto assignment to @kadiealexander (
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.lanitochka17 commentedon Aug 27, 2024
@kadiealexander 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
tsa321 commentedon Aug 28, 2024
Edited by proposal-police: This proposal was edited at 2024-08-28 06:51:06 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Search list when submitting expense, doesn't display contacts section
What is the root cause of that problem?
When submitting an expense, if there is no chat history with a contact in the contact list, it will be included in the
Contactssection. However, if there is chat history, it will be included inrecentReportsor justChats. The issue is thatrecentReportsis limited to a maximum of 5 recent reports (because of thesliceandsplicein below code), causing the remaining reports to be discarded:App/src/libs/OptionsListUtils.ts
Lines 2391 to 2393 in 071f11c
and here:
App/src/libs/OptionsListUtils.ts
Lines 2465 to 2467 in 071f11c
As a result, it seems that some contacts are missing, and many reports are not displayed due to this filtering (slice / splice).
What changes do you think we should make in order to solve the problem?
We could store the remaining reports from
recentReportsinto a separateolderReports(or another name) data and return it to the caller inMoneyRequestParticipantsSelector(must check other caller if necessary).When generating section data:
App/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx
Lines 192 to 204 in 071f11c
include the olderReports data. The sketch code changes could be something like this. We must also check other usage of
filterOptionsand adjust the code accordingly. and If we want to re-order the olderReports by other criteria (other than date), we can adjust it there.What alternative solutions did you explore? (Optional)
The alternative solution is to retrieve DM reports from older or discarded reports and include them in the contact list.
melvin-bot commentedon Aug 30, 2024
Job added to Upwork: https://www.upwork.com/jobs/~016d2f5d8be09bffb6
[-]Submit Expense - Search list when submitting expense, doesn´t display the contacts section[/-][+][$250] Submit Expense - Search list when submitting expense, doesn´t display the contacts section[/+]melvin-bot commentedon Aug 30, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eh2077 (
External)105 remaining items
RachCHopkins commentedon Nov 4, 2024
@c3024 @eh2077 I would really love to pay you. Can someone please complete the checklist?
eh2077 commentedon Nov 4, 2024
@RachCHopkins Sorry for the late response! I put it on my list and will complete it by EOD.
eh2077 commentedon Nov 4, 2024
Checklist
Regression test
RachCHopkins commentedon Nov 8, 2024
Thank you - I will get this sorted out on my Monday!
MonilBhavsar commentedon Nov 8, 2024
Thank you!
RachCHopkins commentedon Nov 10, 2024
Payment Summary:
Upwork job here
RachCHopkins commentedon Nov 10, 2024
Contributor has been paid, the contract has been completed, and the Upwork post has been closed.
eh2077 commentedon Nov 11, 2024
Requested payment in NewDot
JmillsExpensify commentedon Nov 11, 2024
$250 approved for @eh2077