[Hold for payment 2021-09-07] Request a call - Phone number is filled in First Name box
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:
- Launch the app
- Log in phone number account
- Search for Concierge
- Click on Phone icon
Expected Result:
The phone number should not be displayed in First Name box
Actual Result:
Phone number displayed by default in First Name box
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platform:
Where is this issue occurring?
- Web
- iOS
- Android
- Desktop App
- Mobile Web
**Version Number:**1.0.88-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:
https://www.upwork.com/jobs/~0151a4a87a2174a396
Triggered auto assignment to @Julesssss (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Proposal
Need to get rid of the sms domain in this function while checking if the login is same as displayName
if (Str.removeSMSDomain(login) === displayName) { //on line 133
Proposal
I found that we have firstName and lastName as separate values in prop.myPersonalDetails if set already.

Only if has these properties, we need to set them here otherwise leave them blank, https://github.com/Expensify/App/blob/ae38f1bf03eace0d25124c9947010b77f43ac962/src/pages/RequestCallPage.js#L68-L71
This function below is unnecessary, https://github.com/Expensify/App/blob/ae38f1bf03eace0d25124c9947010b77f43ac962/src/pages/RequestCallPage.js#L129
we could use lodashGet to retrieve firstName & lastName, from myPersonalDetailsProp or else give default ''.
I think we need to update this also, https://github.com/Expensify/App/blob/ae38f1bf03eace0d25124c9947010b77f43ac962/src/pages/personalDetailsPropType.js
Triggered auto assignment to @arielgreen (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Posted to Upwork here.
Triggered auto assignment to @Beamanator (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Proposed Solution
What I understood is, If first name is same as phone number then we have to keep first name empty within form. So I will suggest to modify constructor for src/pages/RequestCallPage.js file.
How It works: Within constructor we have to check if first name is same as phone number then set first name empty within form, otherwise keep first name as it is.
Constructor code will looks like as under once modified as per my suggestion. I will prefer this way so we don't need to change code any other place.
constructor(props) {
super(props);
const {firstName, lastName} = this.getFirstAndLastName(props.myPersonalDetails);
const phoneNumber = this.getPhoneNumber(props.user.loginList) ?? '';
const firstNameDefault = (firstName === phoneNumber) ? '' : firstName;
this.state = {
firstName: firstNameDefault,
lastName,
phoneNumber,
isLoading: false,
};
this.onSubmit = this.onSubmit.bind(this);
this.getPhoneNumber = this.getPhoneNumber.bind(this);
this.getFirstAndLastName = this.getFirstAndLastName.bind(this);
}
If my solution considered then kindly accept my Upwork proposal. Once proposal accepted, I will do final testing and submit pull request within 2 days.
My Upwork profile: https://www.upwork.com/freelancers/~01c718889ed7821f82
Best Regards, Prashant Mangukiya
@thesahindia I like your idea, it's short and sweet and works quite well π I just assigned this task to you, please submit a PR when you have a chance :)
@Beamanator Just for clarification, I hope answer helps me in future my proposals.
As I said in my proposal https://github.com/Expensify/App/issues/4864#issuecomment-906991980
When we have the values we need in props itself why we need to do the spliting from displayName.
@Santhosh-Sellavel If a bug surfaces in the future and we end up needing to use those props, your proposal will be amazing π However, my thought on this was that @thesahindia 's was so nice and simple (and worked when I tested) that it makes the most sense to do a one-line fix.
Issue reproducible during KI retests
π Deployed to staging by @Beamanator in version: 1.0.88-3 π
| platform | result |
|---|---|
| π€ android π€ | cancelled πͺ |
| π₯ desktop π₯ | cancelled πͺ |
| π iOS π | cancelled πͺ |
| πΈ web πΈ | success β |
π Deployed to production by @roryabraham in version: 1.0.90-2 π
| platform | result |
|---|---|
| π€ android π€ | success β |
| π₯ desktop π₯ | success β |
| π iOS π | failure β |
| πΈ web πΈ | success β |
Issue not reproducible during KI retests (Fixed π)
Paid! Thanks for your work on this, @thesahindia.