Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.56k stars 2.9k forks source link

[$500] Split bill - Participant display name changes to email when split bill is created offline #25927

Closed lanitochka17 closed 1 year ago

lanitochka17 commented 1 year ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to staging.new.expensify,com
  2. Go offline
  3. Create split bill with a few users with display name
  4. Go to + > Split bill > Enter amount > Next

Expected Result:

The display name for users involved in the split bill in Step 3 will remain

Actual Result:

The display name for users involved in the split bill in Step 3 changes to their contact method (email)

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Version Number: 1.3.57-0

Reproducible in staging?: Yes

Reproducible in production?: Yes

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

https://github.com/Expensify/App/assets/78819774/effaea9c-1a10-49cb-9153-2814209a2e6d

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a732bd3ce537a266
  • Upwork Job ID: 1699233562435706880
  • Last Price Increase: 2023-09-20
melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @anmurali (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] commented 1 year ago

Bug0 Triage Checklist (Main S/O)

bernhardoj commented 1 year ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

When we do a split bill with a user we never chatted before with a display name but we have their contact (personal detail), their display name will be changed to their login. I can only reproduce this case on a high-traffic account where we have other user accounts without ever chatting with them.

What is the root cause of that problem?

When we do a split bill, we check if we should create an optimistic personal detail. https://github.com/Expensify/App/blob/f48a2085d2e22bc011c4028fce56413d088b7896/src/libs/actions/IOU.js#L826-L836

shouldCreateOptimisticPersonalDetails is true if there is no chat/report found with the selected participant. In case where we already have the user's personal details but not the report, it will override the existing personal details with the optimistic detail. That's why after the request, the avatar and display name are changed.

This issue also happens when making a request money.

What changes do you think we should make in order to solve the problem?

I don't know if there will be a real case where we have the user's personal details but not their report/chat.

Instead of checking whether we have a report/chat with the user, we can check if we already have the user's personal details.

!Boolean(personalDetails[accountID]) ? optimisticPersonalDetails : undefined

We will need to pass the personalDetails from MoneyRequestConfirmPage

melvin-bot[bot] commented 1 year ago

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

anmurali commented 1 year ago

Will get to this tomorrow.

melvin-bot[bot] commented 1 year ago

@anmurali Huh... This is 4 days overdue. Who can take care of this?

anmurali commented 1 year ago

What's interesting is this seems to only happen to some accounts

See the video. Test User - display name shows. But for the other user (Kevin), the display name is replaced with email.

https://github.com/Expensify/App/assets/14225673/9cedfe24-bf5e-44b6-b77c-70f7736ebbe5

melvin-bot[bot] commented 1 year ago

Job added to Upwork: https://www.upwork.com/jobs/~01a732bd3ce537a266

melvin-bot[bot] commented 1 year ago

Current assignee @anmurali is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] commented 1 year ago

Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (External)

lanitochka17 commented 1 year ago

@anmurali @bernhardoj The issue is repeated with avatars as well. Do we need to open another bug or is this related to this bug? Thanks

https://github.com/Expensify/App/assets/78819774/face49d2-cc0e-446f-a3a9-79d1b3c0bde6

bernhardoj commented 1 year ago

@lanitochka17 it's related to this bug, so no need to create a new report.

thesahindia commented 1 year ago

I am not able to repro this issue.

bernhardoj commented 1 year ago

@thesahindia can you try using high traffic account? The split bill participant must be a user you never chat with,

melvin-bot[bot] commented 1 year ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

@anmurali @thesahindia this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

thesahindia commented 1 year ago

The split bill participant must be a user you never chat with,

Facing another issue when trying to follow this step. I created two new accounts but their name doesn't appear when I search them in split bill flow.

https://github.com/Expensify/App/assets/83179295/72cc510e-6be3-49d8-a266-0ae1936e5ea3

melvin-bot[bot] commented 1 year ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

mvtglobally commented 1 year ago

Issue not reproducible during KI retests. (First week)

melvin-bot[bot] commented 1 year ago

@anmurali, @thesahindia Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] commented 1 year ago

@anmurali @thesahindia this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:

Thanks!

melvin-bot[bot] commented 1 year ago

Current assignee @thesahindia is eligible for the Internal assigner, not assigning anyone new.

melvin-bot[bot] commented 1 year ago

@anmurali, @thesahindia Still overdue 6 days?! Let's take care of this!

anmurali commented 1 year ago

https://expensify.slack.com/archives/C049HHMV9SM/p1695659246996439

melvin-bot[bot] commented 1 year ago

@anmurali, @thesahindia Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] commented 1 year ago

@anmurali, @thesahindia 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

anmurali commented 1 year ago

Cannot reproduce