App icon indicating copy to clipboard operation
App copied to clipboard

[Hold for payment 2021-09-07] Request a call - Phone number is filled in First Name box

Open isagoico opened this issue 5 years ago β€’ 15 comments

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:

  1. Launch the app
  2. Log in phone number account
  3. Search for Concierge
  4. 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

image

Expensify/Expensify Issue URL:

View all open jobs on GitHub

https://www.upwork.com/jobs/~0151a4a87a2174a396

isagoico avatar Aug 26 '21 18:08 isagoico

Triggered auto assignment to @Julesssss (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Aug 26 '21 18:08 MelvinBot

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

thesahindia avatar Aug 26 '21 19:08 thesahindia

Proposal

I found that we have firstName and lastName as separate values in prop.myPersonalDetails if set already. Screenshot 2021-08-27 at 12 51 09 PM

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

Santhosh-Sellavel avatar Aug 27 '21 07:08 Santhosh-Sellavel

Triggered auto assignment to @arielgreen (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Aug 27 '21 10:08 MelvinBot

Posted to Upwork here.

arielgreen avatar Aug 27 '21 22:08 arielgreen

Triggered auto assignment to @Beamanator (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

MelvinBot avatar Aug 27 '21 22:08 MelvinBot

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

PrashantMangukiya avatar Aug 29 '21 06:08 PrashantMangukiya

@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 avatar Aug 30 '21 09:08 Beamanator

@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 avatar Aug 30 '21 09:08 Santhosh-Sellavel

@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.

Beamanator avatar Aug 30 '21 09:08 Beamanator

Issue reproducible during KI retests

isagoico avatar Aug 30 '21 15:08 isagoico

πŸš€ Deployed to staging by @Beamanator in version: 1.0.88-3 πŸš€

platform result
πŸ€– android πŸ€– cancelled πŸ”ͺ
πŸ–₯ desktop πŸ–₯ cancelled πŸ”ͺ
🍎 iOS 🍎 cancelled πŸ”ͺ
πŸ•Έ web πŸ•Έ success βœ…

botify avatar Aug 30 '21 17:08 botify

πŸš€ Deployed to production by @roryabraham in version: 1.0.90-2 πŸš€

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 failure ❌
πŸ•Έ web πŸ•Έ success βœ…

botify avatar Sep 01 '21 01:09 botify

Issue not reproducible during KI retests (Fixed πŸŽ‰)

isagoico avatar Sep 05 '21 23:09 isagoico

Paid! Thanks for your work on this, @thesahindia.

arielgreen avatar Sep 07 '21 17:09 arielgreen