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.54k stars 2.88k forks source link

[HOLD for payment 2024-10-04][$250] Dupe detect - Invited user is not able to see the receipt placeholder on the confirmation page #47903

Closed IuliiaHerets closed 1 month ago

IuliiaHerets commented 2 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: v9.0.24-0 Reproducible in staging?: Y Reproducible in production?: N Email or phone of affected tester (no customers): applausetester+kh050806@applause.expensifail.com Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create a workspace.
  3. Submit two same expenses to the workspace chat.
  4. Go to transaction thread (any).
  5. Click Review duplicates > Keep this one (any).
  6. Proceed to confirmation page.
  7. Note that there is a receipt placeholder on the confirmation page.
  8. As another user, invite the current user to a workspace.
  9. As the invited user, go to workspace chat.
  10. Repeat Step 3 to 6.
  11. Notet hat there is no receipt placeholder on the confirmation page.

Expected Result:

In Step 11, the invited user should be able to see the receipt placeholder on the confirmation page.

Actual Result:

In Step 11, the invited user is unable to see the receipt placeholder on the confirmation page.

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/d71a42cb-0a61-4662-9bc6-7ac4b61b8d20

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01741cd4c1fe7a4231
  • Upwork Job ID: 1828132802801480968
  • Last Price Increase: 2024-08-26
Issue OwnerCurrent Issue Owner: @zanyrenney
melvin-bot[bot] commented 2 months ago

Triggered auto assignment to @zanyrenney (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

melvin-bot[bot] commented 2 months ago

Triggered auto assignment to @iwiznia (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

github-actions[bot] commented 2 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.
IuliiaHerets commented 2 months ago

We think that this bug might be related to #wave-control

daledah commented 2 months ago

Proposal

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

In Step 11, the invited user is unable to see the receipt placeholder on the confirmation page.

What is the root cause of that problem?

when canEditReceipt=false, we only show Receipt empty state to admin and Approver in here

https://github.com/Expensify/App/blob/259a9b781a3904c7246d4317f5ef37ff986afacb/src/components/ReportActionItem/MoneyRequestView.tsx#L382-L383

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

We should show Receipt empty state to requestor too like we did here

  1. Calculate isRequestor based on currentUserPersonalDetails and parentReportAction
    const currentUserPersonalDetails = useCurrentUserPersonalDetails();
    const isRequestor = currentUserPersonalDetails.accountID === parentReportAction?.actorAccountID;
  2. Update logic shouldShowReceiptEmptyState here
    const shouldShowReceiptEmptyState =
        isReceiptAllowed && !hasReceipt && !isApproved && !isSettled && (canEditReceipt || isAdmin || isApprover || isRequestor) && (canEditReceipt || ReportUtils.isPaidGroupPolicy(report));

What alternative solutions did you explore? (Optional)

melvin-bot[bot] commented 2 months ago

Current assignee @iwiznia is eligible for the DeployBlockerCash assigner, not assigning anyone new.

github-actions[bot] commented 2 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.
iwiznia commented 2 months ago

Update logic shouldShowReceiptEmptyState here

Let's make this a method that we use in both places instead of duplicating the logic.

Calculate isRequestor based on currentUserPersonalDetails and parentReportAction

I see your code has parentReportAction?.actorAccountID in what case there's no parentReportAction and how will we determine who is the requestor in that case? Also what exactly is this parent report action? What type is it? When is it added? Are we sure it will match the requestor of the report?

zanyrenney commented 2 months ago

I am heading OOO so please reapply the bug label if this needs payment i the next 7 days, otherwise i'll pay on return!

daledah commented 2 months ago

@iwiznia

Let's make this a method that we use in both places instead of duplicating the logic.

I think this problem will be resolved during PR.

I see your code has parentReportAction?.actorAccountID in what case there's no parentReportAction and how will we determine who is the requestor in that case? Also what exactly is this parent report action? What type is it? When is it added? Are we sure it will match the requestor of the report?

When we create a new expense, the parentReportAction when we open the duplicate confirmation page is the report action created by that expense. Therefore, the actorAccountID in the parentReportAction is requestor.

melvin-bot[bot] commented 2 months ago

Triggered auto assignment to @roryabraham (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

github-actions[bot] commented 2 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.
roryabraham commented 2 months ago

Dupe detection is still behind a beta. Pretty certain this doesn't need to be a deploy blocker, but I'm going to try and check how many people are on the beta

roryabraham commented 2 months ago

Confirmed, we can demote this:

image
melvin-bot[bot] commented 2 months ago

Job added to Upwork: https://www.upwork.com/jobs/~01741cd4c1fe7a4231

melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

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

allroundexperts commented 2 months ago

@daledah's proposal has the correct RCA and the proposed solution seems fine as well. Let's go with them.

🎀 👀 🎀 C+ reviewed

melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

📣 @daledah You have been assigned to this job! Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻 Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs! Keep in mind: Code of Conduct | Contributing 📖

daledah commented 2 months ago

@allroundexperts PR is ready for review.

melvin-bot[bot] commented 1 month ago

This issue has not been updated in over 15 days. @allroundexperts, @roryabraham, @zanyrenney, @daledah eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

roryabraham commented 1 month ago

The PR for this was deployed to prod on 2024-09-27. Setting payout timer manually.

side-note: working on fixing the automation in https://github.com/Expensify/App/issues/49963

melvin-bot[bot] commented 1 month ago

Triggered auto assignment to @OfstadC (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

zanyrenney commented 1 month ago

Hi! I am going OOO tomorrow when this payment is due, back on 7th October. Could you please handle the payment? I would be happy to take it back if there are any blockers when I am back. Thanks!

OfstadC commented 1 month ago

Old job post expired - new one here

@daledah - Could you please accept this offer? Thank you! 😃

daledah commented 1 month ago

@OfstadC accepted 🙏

OfstadC commented 1 month ago

Payment Summary