-
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 2023-03-16] Allow searching for phone numbers with parenthesis, spaces and dashes in them #15491
Comments
Hello, I'm Nicolay from Callstack and I'm interested in taking and analysing this issue to work on a fix for it. |
Job added to Upwork: https://www.upwork.com/jobs/~0185423b9270557864 |
Triggered auto assignment to Contributor Plus for review of internal employee PR - @sobitneupane ( |
Great, looking forward to working with you @narefyev91. Please post a high-level proposal here about how you plan to approach the solution before you raise a PR. You can use the proposal template here. Thanks! |
ProposalPlease re-state the problem that we are trying to solve in this issue.Allow searching for phone numbers with parenthesis, spaces and dashes in them What is the root cause of that problem?The What changes do you think we should make in order to solve the problem?Before passing the user input as an argument to onChangeText handler, a regex can be employed to remove all the unnecessary characters in the phone number so that the function that does the searching, receives input that matches the internal structure of a valid phone number. The flow would be as follows:
What alternative solutions did you explore? (Optional) |
📣 @vegtelenseg! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Format:
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
ProposalPlease re-state the problem that we are trying to solve in this issue.Searching with formatted phone number is not working, application won't recognise it as a phone number that we can create a chat with What is the root cause of that problem?The main issue here that search mechanism is not understand formatted phones.
To catch phone number - we will use What alternative solutions did you explore?cc @puneetlath |
This mostly sounds good to me. However for this:
We want to make sure that we don't edit the user input. The user should see what they typed unchanged. Meaning the user should see the value in the input field exactly how they typed it. However if they type a formatted number, any matching unformatted phone number chats should show in the list and creating the chat should work properly. Can you update the proposal accordingly? Also @sobitneupane if you have any other thoughts. |
@puneetlath |
Ok cool. That sounds good to me. Two other things:
Otherwise, the proposal sounds good to me. |
@puneetlath |
@puneetlath, @sobitneupane, @narefyev91 Whoops! This issue is 2 days overdue. Let's get this updated quick! |
PR is on staging. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.80-2 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 2023-03-16. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
@sobitneupane sent you a hiring offer. For me: https://www.upwork.com/nx/wm/pre-hire/c/8577561/offer/23642022 |
@puneetlath Thanks. Accepted the offer. |
All paid. Thanks @narefyev91 and @sobitneupane! |
Problem
It is very common for phone numbers to be formatted with dashes, parenthesis, and spaces. For example, my iPhone will automatically format
2345678899
to(234) 567-8899
. If I then copy that phone number into theNew Chat
page in Expensify, it won't recognize it as a phone number that I can create a chat with. It only recognizes2345678899
or+12345678899
.This is unlike the sign in page, which handles phone numbers like this just fine.
Solution
Treat phone numbers with these characters as phone numbers. We should not modify the user's input that they type, but we should strip these characters when validating whether it is a phone number. That would mean that I can create a chat with
(234) 567-8899
. Or, if I search for(234) 567-8899
it will find my chat with+12345678899
.Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: