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
[Due for payment 2025-11-17] [$250] Expense - Self DM does not show up in the result when searched by display name #71789
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Update filterSelfDMChat unit test to verify the result matches when the display name containsan uppercase character.
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Please re-state the problem that we are trying to solve in this issue.
Expense - Self DM does not show up in the result when searched by display name
What is the root cause of that problem?
When a user searches for their display name, the search term is converted to lowercase and split into terms. However, filterSelfDMChat compares these lowercase search terms against the original-cased values from report.text without normalizing or lowercasing them first
What changes do you think we should make in order to solve the problem?
Normalize and lowercase the values before comparison like filterReports function
functionfilterSelfDMChat(report: SearchOptionData,searchTerms: string[]): SearchOptionData|undefined{constnormalizedSearchTerms=searchTerms.map((term)=>StringUtils.normalizeAccents(term));constisMatch=normalizedSearchTerms.every((term)=>{constvalues: string[]=[];if(report.text){values.push(StringUtils.normalizeAccents(report.text).toLowerCase());}if(report.login){values.push(StringUtils.normalizeAccents(report.login).toLowerCase());values.push(StringUtils.normalizeAccents(report.login.replace(CONST.EMAIL_SEARCH_REGEX,'')).toLowerCase());}if(report.isThread){if(report.alternateText){values.push(StringUtils.normalizeAccents(report.alternateText).toLowerCase());}}elseif(!!report.isChatRoom||!!report.isPolicyExpenseChat){if(report.subtitle){values.push(StringUtils.normalizeAccents(report.subtitle).toLowerCase());}}// Remove duplicate values and check if the term matches any valuereturnuniqFast(values).some((value)=>value.includes(term));});returnisMatch ? report : undefined;}
changed the title [-]Expense - Self DM does not show up in the result when searched by display name[/-][+][$250] Expense - Self DM does not show up in the result when searched by display name[/+]on Oct 3, 2025
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: This was an edge case that wasn't considered during any implementation PR. As such, there isn't a single culprit PR.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Account has self DM and display name
Test:
Open FAB -> Create expense > Manual
Enter amount -> Next
On recipient list, enter your display name
Clear display name and enter You
Verify that self DM will show up in the result when searched by display name
Activity
melvin-bot commentedon Oct 2, 2025
Triggered auto assignment to @lschurr (
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.nkdengineer commentedon Oct 2, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Self DM does not show up in the result when searched by display name, but it shows up when searched by "You" instead
What is the root cause of that problem?
The
valuesarray isn't lowercase before matching, and the selfDM result isn't matchedApp/src/libs/OptionsListUtils/index.ts
Lines 2390 to 2412 in 49f9ce2
What changes do you think we should make in order to solve the problem?
We should convert to a lowercase string before matching
App/src/libs/OptionsListUtils/index.ts
Lines 2390 to 2412 in 49f9ce2
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Update
filterSelfDMChatunit test to verify the result matches when the display name containsan uppercase character.What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
nyomanjyotisa commentedon Oct 2, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expense - Self DM does not show up in the result when searched by display name
What is the root cause of that problem?
When a user searches for their display name, the search term is converted to lowercase and split into terms. However,
filterSelfDMChatcompares these lowercase search terms against the original-cased values fromreport.textwithout normalizing or lowercasing them firstApp/src/libs/OptionsListUtils/index.ts
Lines 2390 to 2416 in 49f9ce2
What changes do you think we should make in order to solve the problem?
Normalize and lowercase the values before comparison like
filterReportsfunctionApp/src/libs/OptionsListUtils/index.ts
Lines 2390 to 2416 in 49f9ce2
What alternative solutions did you explore? (Optional)
None
[-]Expense - Self DM does not show up in the result when searched by display name[/-][+][$250] Expense - Self DM does not show up in the result when searched by display name[/+]melvin-bot commentedon Oct 3, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021974193357180862799
melvin-bot commentedon Oct 3, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts (
External)allroundexperts commentedon Oct 3, 2025
@nkdengineer's proposal looks good to me.
@nyomanjyotisa Thanks for the proposal. I think it has the same RCA and the solution is not very different as well.
🎀 👀 🎀 C+ reviewed
melvin-bot commentedon Oct 3, 2025
Triggered auto assignment to @youssef-lr, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
19 remaining items
allroundexperts commentedon Nov 12, 2025
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: This was an edge case that wasn't considered during any implementation PR. As such, there isn't a single culprit PR.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
Verify that self DM will show up in the result when searched by display name
Do we agree 👍 or 👎
melvin-bot commentedon Nov 27, 2025
@youssef-lr 10 days overdue. Is anyone even seeing these? Hello?
youssef-lr commentedon Dec 2, 2025
Not overdue
melvin-bot commentedon Dec 5, 2025
@youssef-lr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
youssef-lr commentedon Dec 9, 2025
@lschurr can you check the last task from here please
lschurr commentedon Dec 10, 2025
Payment Summary
Contributor: @nkdengineer due $250 via NewDot
Contributor+: @allroundexperts due $250 via NewDot
trjExpensify commentedon Jan 5, 2026
approved $250 for @allroundexperts.
twisterdotcom commentedon Mar 11, 2026
@nkdengineer has submitted payment for this report on ND here.
SO: https://stackoverflowteams.com/c/expensify/questions/7582
Zapier Logs
Run ID: 00040eee-5e98-abe8-8146-c92ff85e3f74