-
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
[HOLD for payment 2023-07-06] [$1000] Error not displayed for invalid phone number in New Contact Method section #21247
Comments
Triggered auto assignment to @conorpendergrast ( |
Bug0 Triage Checklist (Main S/O)
|
I think numbers which have letters in them are in fact valid phone numbers like |
@getusha Maybe, but we don't translate So there are two potential solutions: reject non-numeric phone numbers (ie: show an error when you enter I think we can safely use the first solution by validating that field. we seem to reject it on the back-end, as we initially allow that phone number to be entered, and then we silently remove it from the Contact Method list. |
This may have a similar solution to #21230, also reported by @tewodrosGirmaA |
Job added to Upwork: https://www.upwork.com/jobs/~0193d5a8ad70190344 |
Current assignee @conorpendergrast is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Error is not displayed for phone numbers letters between them What is the root cause of that problem?The library we are using What changes do you think we should make in order to solve the problem?We can use
// phoneLogin will be pure number and will be validated by the Str utils.
Str.isValidPhone(phoneLogin) What alternative solutions did you explore? (Optional)N/A |
Thanks for the proposal @getusha. This looks good to me. As you rightly said, letters is phone numbers is acceptable but as mentioned earlier we don't convert them to digits. @conorpendergrast We can use @getusha's solution. The linked issue is related to email and not necessarily the same solution. C+ reviewed 🎀👀🎀 |
ProposalPlease re-state the problem that we are trying to solve in this issue.The form validates telephone numbers with letters in them on add new contact page What is the root cause of that problem?The root cause of the problem is that we use awsome-phonenumber lib to check telephone number validity. And this lib uses Google's libphonenumber. and here's the recoding table: What changes do you think we should make in order to solve the problem?We could check if the input number contains letters and replace the number using awsome-phonenumbers methods. We already do it before sending info to backend here: App/src/pages/settings/Profile/Contacts/NewContactMethodPage.js Lines 71 to 73 in 9bef507
So we could update number in the form after successful check for validity |
Firstly, a regex pattern should be defined to validate phone numbers. This pattern should cover the acceptable format and any specific requirements for phone numbers in your system. For example, it might include rules for country codes, area codes, and number length. Once the regex pattern is defined, it can be applied to the phone number input field in the "New Contact Method" section. This can be done during the form validation process. When the user submits the form or moves to the next field, the phone number should be checked against the regex pattern. |
📣 @Babur171! 📣
|
@mananjadhav Can you do that thang and post to accept the solution? That'll auto-assign the engineer to review and confirm the solution, and assign @getusha. Thank you! |
@conorpendergrast Sorry I missed that, I updated the comment, will it assign then? |
@conorpendergrast Am I doing something wrong? It looks like it didn't assign an engineer. |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
Ah, that won't work for me anyway because I'm C+ (I checked where we interact with GitHub's webhook on this). @mananjadhav I don't think it works on comment edits, I think. Can you try posting with just |
Will the fix in this issue address any invalid field - phone or email? Would you like me to close this as a duplicate? |
I think this will just fix the phone. We can add email here, but I think better to have a separate issue? 🎀 👀 🎀 C+ Reviewed |
📣 @getusha You have been assigned to this job by @jasperhuangg! |
PR is up! @mananjadhav @jasperhuangg |
I see the PR has been reviewed and approved by @mananjadhav, currently waiting for review by @jasperhuangg 👍 |
🎯 ⚡️ Woah @mananjadhav / @getusha, great job pushing this forwards! ⚡️ The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉
On to the next one 🚀 |
Contracts sent for all three (bug, C and C+), including the 50% urgency bonus for C and C+ |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.34-1 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-07-06. 🎊 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:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
cc @conorpendergrast it's past 07/06, let's get people paid! |
I agree, everyone got paid! @mananjadhav We just need the checklist now please |
Here's the offending PR, which I think caused the bug when resolving merge conflicts here? I've posted a comment here. I do think it makes sense to add a regression test here so that we don't end up looking at this case again. @conorpendergrast The test steps from the PR are good enough for the regression test. |
Those steps would be:
I'll create a regression test for that today |
Regression test created: https://github.com/Expensify/Expensify/issues/299038 And we're all done! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
The app should display an error for invalid phone numbers to ensure consistency
Actual Result:
The app does not display an error for invalid phone numbers in the New Contact Method section.
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.30-0
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
screen-capture - 2023-06-15T014547.796.webm
Recording.1051.mp4
Expensify/Expensify Issue URL:
Issue reported by: @tewodrosGirmaA
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686819848909279
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: