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
[$500] PR27257-mWeb-Login-Typing phone number without country code, country code not added &SMSnot received #28805
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
changed the title [-]PR27257-mWeb-Login-Typing phone number without country code, country code not added &SMSnot received[/-][+][$500] PR27257-mWeb-Login-Typing phone number without country code, country code not added &SMSnot received[/+]on Oct 4, 2023
Does expensify intend to append country codes for the numbers of all countries ?
if the answer is no: then this is not a bug.
the phone number is parsed and the country code +1 is appended to all the numbers.
and on the codeValidate form formatted phone number is displayed.
functionformatPhoneNumber(number: string): string{if(!number){return'';}constnumberWithoutSMSDomain=Str.removeSMSDomain(number);constparsedPhoneNumber=parsePhoneNumber(numberWithoutSMSDomain);// return the string untouched if it's not a phone numberif(!parsedPhoneNumber.valid){if(parsedPhoneNumber.number?.international){returnparsedPhoneNumber.number.international;}returnnumberWithoutSMSDomain;}constregionCode=parsedPhoneNumber.countryCode;if(regionCode===countryCodeByIP){returnparsedPhoneNumber.number.national;}returnparsedPhoneNumber.number.international;}
since +1 is appended to all the numbers, it returns formatted number without country code.
it happens for all the us numbers. whether you enter country code in input or not.
the screen recording in the bug report is an edge case, where appending +1 to number, results in a valid number on passing to parsePhoneNumber even though it's not a us number.
otherwise international numbers without country code simply fail the validation.
if the intended behaviour is to append country codes to codes of all nations.
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Activity
[-]PR27257-mWeb-Login-Typing phone number without country code, country code not added &SMSnot received[/-][+][$500] PR27257-mWeb-Login-Typing phone number without country code, country code not added &SMSnot received[/+]melvin-bot commentedon Oct 4, 2023
Job added to Upwork: https://www.upwork.com/jobs/~017eea02da3f18b41e
melvin-bot commentedon Oct 4, 2023
Triggered auto assignment to @zanyrenney (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Oct 4, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Oct 4, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @narefyev91 (
External)izarutskaya commentedon Oct 4, 2023
Found when validating PR #27257
pradeepmdk commentedon Oct 4, 2023
as per this is not a bug https://expensify.slack.com/archives/C049HHMV9SM/p1690373508303109 by default +1 country code added in the background.
soro-kuraima commentedon Oct 4, 2023
Does expensify intend to append country codes for the numbers of all countries ?
if the answer is no: then this is not a bug.
the phone number is parsed and the country code +1 is appended to all the numbers.
and on the codeValidate form formatted phone number is displayed.
since +1 is appended to all the numbers, it returns formatted number without country code.
it happens for all the us numbers. whether you enter country code in input or not.
the screen recording in the bug report is an edge case, where appending +1 to number, results in a valid number on passing to parsePhoneNumber even though it's not a us number.
otherwise international numbers without country code simply fail the validation.
if the intended behaviour is to append country codes to codes of all nations.
melvin-bot commentedon Oct 10, 2023
@narefyev91, @zanyrenney Huh... This is 4 days overdue. Who can take care of this?
zanyrenney commentedon Oct 10, 2023
Closing based on #28805 (comment)