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
Chat search should prioritise a perfectly matching email above a partially matching one #8763
Sign in to two accounts, in my case user7@expensify.com & user2@expensify.com
As one user, attempt to search for the other, using their EMAIL ADDRESS
Enter the full emal address and hit enter
Expected Result:
I would expect the first result to be the user which matches the email
Actual Result:
A completely different user chat was opened, one which is similarly named
Workaround:
Manually select the user which matches the email search
NewDot-SearchShouldPrioritiseFullMatches.mov
Platform:
Web
Desktop App
Version Number: v1.1.56-0 Reproducible in staging?: Yep Reproducible in production?: Yep Email or phone of affected tester (no customers): N/A Logs:https://stackoverflow.com/c/expensify/questions/4856 N/A Notes/Photos/Videos: See above Expensify/Expensify Issue URL: N/A Issue reported by:@Julesssss Slack conversation: N/A
changed the title [-][$250] Chat search should prioritise a perfectly matching email above a partially matching one[/-][+]Chat search should prioritise a perfectly matching email above a partially matching one[/+]on Apr 27, 2022
When I search for "user1@" it selects the correct person:
When I search for "newuser1@" it also selects the correct person:
It appears to be working correctly, but maybe there is something specific about your setup that is causing the issue you're seeing. Do you think you could help me narrow down the exact case to reproduce this?
Ah curious. I'll take another look at my env first thing tomorrow morning and get back to you. It's even more of an edge case than I originally thought :D
I tried again today and noticed that newuser2@... was showing above user2@ because I had sent messages to that user recently. I still think there's an argument that a literal email match should take priority over recent chat history, but I'll leave it up to you to decide whether this is worth changing.
Aha! Maybe there is something there. I see we are setting sortByLastMessageTimestamp: false, when doing a search, so I will look into that a little more.
Activity
melvin-bot commentedon Apr 25, 2022
Triggered auto assignment to @laurenreidexpensify (
AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.melvin-bot commentedon Apr 26, 2022
Current assignee @Julesssss is eligible for the Engineering assigner, not assigning anyone new.
laurenreidexpensify commentedon Apr 26, 2022
@Julesssss wanna apply the rest of the labels to get this on upwork? add
externaland we're in businessmelvin-bot commentedon Apr 26, 2022
Triggered auto assignment to @jliexpensify (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.13 remaining items
[-][$250] Chat search should prioritise a perfectly matching email above a partially matching one[/-][+]Chat search should prioritise a perfectly matching email above a partially matching one[/+]Julesssss commentedon Apr 27, 2022
Nice, thanks Tim. I honestly wasn't sure if this was worth fixing. But it will inevitably catch users out so let's get it resolved.
Feel free to tag me as a reviewer!
tgolen commentedon Apr 27, 2022
Thanks @Julesssss!
I'm having some issues reproducing the issue. I created three users:
When I search for "user1@" it selects the correct person:

When I search for "newuser1@" it also selects the correct person:

It appears to be working correctly, but maybe there is something specific about your setup that is causing the issue you're seeing. Do you think you could help me narrow down the exact case to reproduce this?
Julesssss commentedon Apr 27, 2022
Ah curious. I'll take another look at my env first thing tomorrow morning and get back to you. It's even more of an edge case than I originally thought :D
jliexpensify commentedon Apr 28, 2022
Cancelling Upworks job.
Julesssss commentedon Apr 28, 2022
@tgolen
I tried again today and noticed that
newuser2@...was showing aboveuser2@because I had sent messages to that user recently. I still think there's an argument that a literal email match should take priority over recent chat history, but I'll leave it up to you to decide whether this is worth changing.tgolen commentedon Apr 28, 2022
Aha! Maybe there is something there. I see we are setting
sortByLastMessageTimestamp: false,when doing a search, so I will look into that a little more.tgolen commentedon Apr 28, 2022
Yep, I was able to reproduce it after having a recent message sent to
newuser1@expensify.com:Looking into it more.