-
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 2025-01-21] [$250] Profile - Incorrect Phone Error Displayed Beside Previously Saved Number #54715
Comments
Triggered auto assignment to @anmurali ( |
Edited by proposal-police: This proposal was edited at 2025-01-01 14:59:02 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Profile - Incorrect Phone Error Displayed Beside Previously Saved Number What is the root cause of that problem?with the phone number App/src/pages/settings/Profile/PersonalDetails/PhoneNumberPage.tsx Lines 50 to 69 in e5108a1
but on the BE side it returned not a valid number What changes do you think we should make in order to solve the problem?We should update function validate phone number here to match with validate from BE side Because we are parsing the phone number with the country code here before putting it in the condition while when calling API we pass the value directly without adding country code here
So when checking the condition, we should not add country code to the const phoneNumberWithCountryCode = LoginUtils.appendCountryCode(values[INPUT_IDS.PHONE_NUMBER]);
const parsedPhoneNumber = PhoneNumberUtils.parsePhoneNumber(values[INPUT_IDS.PHONE_NUMBER]);
if (!parsedPhoneNumber.possible || !Str.isValidE164Phone(phoneNumberWithCountryCode.slice(0))) {
errors[INPUT_IDS.PHONE_NUMBER] = translate('bankAccount.error.phoneNumber');
} What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?We should add App/tests/unit/PhoneNumberTest.ts Line 34 in e5108a1
What alternative solutions did you explore? (Optional)Or we can append country code to phone number before call API 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. |
jerry Your proposal will be dismissed because you did not follow the proposal template. |
@anmurali Huh... This is 4 days overdue. Who can take care of this? |
Job added to Upwork: https://www.upwork.com/jobs/~021876820317399092628 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale ( |
@nkdengineer's proposal looks good here. 🎀👀🎀 C+ reviewed. |
Triggered auto assignment to @blimpich, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
ProposalPlease re-state the problem that we are trying to solve in this issue.When the user save the phone number without using the country code, it displayed the error message with previous correct phone number. What is the root cause of that problem?The validator that is offered in the code, it isn't correct. What changes do you think we should make in order to solve the problem?To solve this problem, please check the validator of the code and can add the new logic to validate the country code. What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A |
📣 @JastiDev! 📣
|
Contributor details |
|
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.When the user save the phone number without using the country code, it displayed the error message with previous correct phone number. What is the root cause of that problem?The validator that is offered in the code, it isn't correct. What changes do you think we should make in order to solve the problem?To solve this problem, please check the validator of the code and can add the new logic to validate the country code. What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A |
Yes, this comment contains the proposal template and all mandatory lines are present. Thus, the appropriate action based on the instructions is:
|
@nkdengineer @akinwale @JastiDev why have we left the part of the proposal template about automated tests as |
Ah, my bad. I missed this. @nkdengineer Please update your proposal to include automated tests that should be implemented. See https://expensify.enterprise.slack.com/archives/C01GTK53T8Q/p1733148961659549?thread_ts=1733148961.659549&cid=C01GTK53T8Q for more details. |
📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Looks good! Thank you for adding the automated test in the proposal! 🙂 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.84-7 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 2025-01-21. 🎊 For reference, here are some details about the assignees on this issue:
|
@akinwale @anmurali @akinwale The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test ProposalTest:
Do we agree 👍 or 👎? |
@akinwale we updated a unit test for this didn't we? So we shouldn't need the proposed regression test right? |
@blimpich I've always thought a regression test is always required regardless, but not needing a regression test would make sense in this case. We would need to have the process clarified. |
@akinwale talked internally about this, there are probably situations where we want both a unit test and a regression test, we can handle it on a case by case basis. For this one I think just the unit test is fine |
@akinwale, @anmurali, @blimpich, @nkdengineer Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: v9.0.80-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 13.6/Chrome
App Component: User Settings
Action Performed:
Expected Result:
The incorrect phone number should be displayed as a placeholder with the error message, or the correct phone number should be erased, showing only the error message to avoid confusion.
Actual Result:
When a valid phone number is saved, it is stored successfully. However, saving an invalid number without a country code shows an error alongside the previously saved correct number, causing user confusion.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6704760_1735724149620.Screen_Recording_2025-01-01_at_1.33.23_AM.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @anmuraliThe text was updated successfully, but these errors were encountered: