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

[HOLD for payment 2023-12-12] [$500] IOU - Unable to create IOU with "Hidden" users #31792

Closed kbecciv closed 11 months ago

kbecciv commented 12 months 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!


Version Number: 1.4.3.0 Reproducible in staging?: y Reproducible in production?: n 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 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create group conversation with users you have not existing conversation before
  3. Click on "+" button from chat composer> Split Bill
  4. Add amount and click Next button

Expected Result:

User should be able to create Split bill with "Hidden" users, Split button should be active

Actual Result:

User is not able to create IOU with "Hidden" users, Split button is grayed out

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/93399543/ba6e62b9-6b3e-431d-a104-1d617c91a767

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b1b3071c11ee0d1c
  • Upwork Job ID: 1727789932415844352
  • Last Price Increase: 2023-11-23
  • Automatic offers:
    • s77rt | Reviewer | 27867123
    • dukenv0307 | Contributor | 27867124
github-actions[bot] commented 12 months ago

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.
melvin-bot[bot] commented 12 months ago

πŸ“£ @github-actions[bot]! πŸ“£ Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
melvin-bot[bot] commented 12 months ago

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

luacmartins commented 12 months ago

Investigating. Might be intended.

luacmartins commented 12 months ago

Ok, I don't think this is intended because we can still split bill with anon users from the global create

luacmartins commented 12 months ago

This issue also happens in prod. Not a blocker. I think this PR introduced the issue because we filter participants without a login here so the participant list is empty

luacmartins commented 12 months ago

Reproducible on production:

https://github.com/Expensify/App/assets/22219519/c8f46c05-88b3-4592-961d-9660846d073f

luacmartins commented 12 months ago

cc @lukemorawski @puneetlath @allroundexperts

melvin-bot[bot] commented 12 months ago

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

melvin-bot[bot] commented 12 months ago

Bug0 Triage Checklist (Main S/O)

melvin-bot[bot] commented 12 months ago

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

melvin-bot[bot] commented 12 months ago

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

dukenv0307 commented 12 months ago

Proposal

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

User is not able to create IOU with "Hidden" users, Split button is grayed out

What is the root cause of that problem?

In here, we're filtering participant without login or text from the IOU confirmation list.

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

Remove that condition. I think there's no need for it because as long as the participants have accountId, we can split bill with them.

Or can update to

.filter((participant) => !!participant.accountID || !!participant.text)

to check for accountID instead of login

What alternative solutions did you explore? (Optional)

If we don't want to allow splitting bill with Hidden users, we should hide the Split bill option in a group where aside from current user, all other users are Hidden users

DylanDylann commented 12 months ago

Proposal

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

Unable to create IOU with "Hidden" users

What is the root cause of that problem?

We don't allow users to create requests or split bills with hidden user. Note that, when clicking request money in FAB and going to the participant page, we also don't display hidden user in the suggestion list

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

I think in DM chat with hidden user or in group chat with hidden users, we should hide the request/send/split bill button when clicking + button. In here https://github.com/Expensify/App/blob/a2fc32bbfb8d5917e83134568187529d488812e2/src/libs/ReportUtils.js#L3868-L3879

We should get the personal details of all otherParticipants and add conditions to make sure that we only show request/send/split bill button if personal detail of all otherParticipants include a login field (It mean that this user is not hidden user)

What alternative solutions did you explore? (Optional)

s77rt commented 11 months ago

@dukenv0307 Thanks for the proposal. Your RCA is correct. The solution looks good to me. I don't see a reason to have that filter condition either but I have asked here for confirmation.

s77rt commented 11 months ago

@DylanDylann Thanks for the proposal. I think in the FAB flow those hidden users are not something that you'd be usually looking for thus not in the list (it's actually a feature since those users are hidden you should not be able to search for them). But for the DM I'd expect the functionality to work as I don't see a reason to disable it.

s77rt commented 11 months ago

Not overdue. Still waiting for a clarification on https://github.com/Expensify/App/pull/27547#discussion_r1404542904

s77rt commented 11 months ago

Got a clarification on the above ^ We can remove the filter as it was only done to avoid a bug that no longer exists.

πŸŽ€ πŸ‘€ πŸŽ€ C+ reviewed Link to proposal

melvin-bot[bot] commented 11 months ago

Current assignee @luacmartins is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

melvin-bot[bot] commented 11 months ago

πŸ“£ @s77rt πŸŽ‰ An offer has been automatically sent to your Upwork account for the Reviewer role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job

luacmartins commented 11 months ago

Proposal looks good. Let's get this fixed!

melvin-bot[bot] commented 11 months ago

πŸ“£ @dukenv0307 πŸŽ‰ An offer has been automatically sent to your Upwork account for the Contributor role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review πŸ§‘β€πŸ’» Keep in mind: Code of Conduct | Contributing πŸ“–

dukenv0307 commented 11 months ago

@s77rt The PR is ready for review.

melvin-bot[bot] commented 11 months ago

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] commented 11 months ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.7-4 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-12-12. :confetti_ball:

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

For reference, here are some details about the assignees on this issue:

melvin-bot[bot] commented 11 months ago

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

s77rt commented 11 months ago

Regression Test Proposal

  1. Start a chat with a user you have not chatted with before
  2. Verify the user's display name is "Hidden"
  3. Start money request flow (press the + grey button)
  4. Verify you were able to complete the money request
zanyrenney commented 11 months ago

payment summary

no bug finder - applause @s77rt requires payment offer (Reviewer) - paid $500 @dukenv0307 requires payment offer (Contributor) - paid $500

zanyrenney commented 11 months ago

regression test can be worked on separately, all payments complete - closing!