App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2021-09-08] [PAY 9/7] Final review modal is showing @expensify.sms for Users with Phone Numbers as their login

Open aman-atg opened this issue 5 years ago • 29 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. Login to newDot
  2. Request money from an account who has phone number as their login
  3. Enter amount and Continue
  4. You will see @expensify.sms after the phone number

Expected Result:

Should show only the phone number image

Actual Result:

image

image

Workaround:

Visual Issue.

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation Expensify/Expensify Issue URL:

View all open jobs on Upwork

aman-atg avatar Aug 05 '21 22:08 aman-atg

Triggered auto assignment to @sakluger (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

MelvinBot avatar Aug 05 '21 22:08 MelvinBot

Proposal

  • To remove the smsDomain we need to pass alternateText: Str.removeSMSDomain(participant.login) here https://github.com/Expensify/App/blob/ec38ff9574ff9f1ac997b29b871aaf13afc5d57e/src/libs/OptionsListUtils.js#L580

aman-atg avatar Aug 05 '21 22:08 aman-atg

@sakluger Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

MelvinBot avatar Aug 09 '21 19:08 MelvinBot

Thanks for creating this issue @aman-atg! I'm reviewing the issue now.

sakluger avatar Aug 09 '21 22:08 sakluger

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

MelvinBot avatar Aug 09 '21 22:08 MelvinBot

This issue is unique and the suggested behavior is in line with what we did in this related issue.

This should be able to be handled by an external contributor.

The su

sakluger avatar Aug 09 '21 22:08 sakluger

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

MelvinBot avatar Aug 09 '21 22:08 MelvinBot

Putting on hold for a week-ish

mallenexpensify avatar Aug 10 '21 22:08 mallenexpensify

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

MelvinBot avatar Aug 16 '21 15:08 MelvinBot

Job posted https://www.upwork.com/jobs/~01b9648852c0022ec5 @chiragsalian will you review @aman-atg 's proposal above? Thx

mallenexpensify avatar Aug 16 '21 15:08 mallenexpensify

I just tried this on dev and i don't see @expensify.sms next to the phone number image

Also tried it on production and i don't see the issue, image

Might be some old issue. @aman-atg can you confirm, if the issue does not exist let's close this GH issue.

chiragsalian avatar Aug 17 '21 19:08 chiragsalian

@chiragsalian It's still happening for me. It's strange this should happen for any number.

Dev

image

PROD

image

aman-atg avatar Aug 17 '21 19:08 aman-atg

Weird, i don't see it for the same number you provided. image

Maybe its because you have first and last name loaded. Trying that next, I created a phone account with test aug17th as the name but i don't see expensify.sms domain. image

Trying your account, i also don't see expensify.sms. lol, weird. image

I just cleared my cache and retested, image

So i'm a little unsure how you are getting the issue. Did you also try on google chrome and did you clear your cache?

chiragsalian avatar Aug 17 '21 22:08 chiragsalian

@mallenexpensify are you also able to reproduce the issue?

chiragsalian avatar Aug 17 '21 22:08 chiragsalian

No, unable to reproduce on desktop, Version 1.0.85-9 (production version released today image

mallenexpensify avatar Aug 17 '21 23:08 mallenexpensify

Did you also try on google chrome and did you clear your cache?

Well, this is a bizarre situation.. I tried with chrome as well and cleared my cache. Even tried on a different machine. image

I think it's only occurring when we request money directly from the chat.

Video for reference.

https://user-images.githubusercontent.com/28243942/129894295-b378d8da-ab50-419c-be81-f2f137c675a2.mp4

If it's still not reproducible then we can maybe close this for now.

aman-atg avatar Aug 18 '21 11:08 aman-atg

I was able to reproduce! Just took a handful of tries.

  • open staging.new.expensify.com in chrome.
  • go to chat with a user where their account login is a phone number
  • click the plus icon next to the compose box (not the big green one)
  • enter amount
  • observe expensify.sms at end of username. 2021-08-18_11-46-19

I cleared my local storage and signed out/back in and the issue persists.

@chiragsalian can you test the above steps, try to reproduce, and if so... review @aman-atg 's proposal to fix?

mallenexpensify avatar Aug 18 '21 18:08 mallenexpensify

Proposal

I propose that we fix the original change that caused this. In newDot we trim the SMS domain from phone numbers while preparing data options for the viewing purpose. Every component follows that. But I see that this https://github.com/Expensify/App/pull/3651 PR added this to fix the issue with IOU Creation but at that time we didn't think of this regression.

  • To Keep the app consistent, we remove the logic to add the SMS domain to options from here https://github.com/Expensify/App/blob/ec38ff9574ff9f1ac997b29b871aaf13afc5d57e/src/libs/OptionsListUtils.js#L109.
  • Then we fix the https://github.com/Expensify/App/issues/3614 we add the SMS domain while passing the logins to createIOUTransaction. This is the same pattern we are following in WorkspaceInvitePage.js https://github.com/Expensify/App/blob/2b57f0fac59d007441fb170fd05445d83392ed86/src/libs/actions/Policy.js#L152

Why do this?

As we create the first drop SMS domain while creating options for the listing and then we are re-adding the SMS domain here and again if remove the SMS Domain from here https://github.com/Expensify/App/blob/ec38ff9574ff9f1ac997b29b871aaf13afc5d57e/src/libs/OptionsListUtils.js#L580. It is so confusing to manage. The main source of the data should only be one location OptionsListUtils file. This is the reason we create options for each component from this module only.

https://github.com/Expensify/App/blob/ec38ff9574ff9f1ac997b29b871aaf13afc5d57e/src/libs/OptionsListUtils.js#L191

parasharrajat avatar Aug 18 '21 21:08 parasharrajat

@chiragsalian, @mallenexpensify it looks like no one is assigned to work on this job. Please double the price or add a comment stating why the job isn't being doubled.

MelvinBot avatar Aug 23 '21 19:08 MelvinBot

Yup, i can reproduce the issue when i request for money within the chat. Previously i had only tried it via the big green one. Cool, looks like a real issue.

I like @parasharrajat, @mallenexpensify can you hire him on upwork. @parasharrajat, feel free to create the PR.

chiragsalian avatar Aug 23 '21 20:08 chiragsalian