Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2024-06-13] [$250] Pay someone - Add receipt placeholder is shown when receipt is not allowed when paying someone #41489

Closed
izarutskaya opened this issue May 2, 2024 · 33 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented May 2, 2024

Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @trjExpensify
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 2, 2024
Copy link

melvin-bot bot commented May 2, 2024

Triggered auto assignment to @trjExpensify (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.

Copy link

melvin-bot bot commented May 2, 2024

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels May 2, 2024
Copy link
Contributor

github-actions bot commented May 2, 2024

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

@izarutskaya
Copy link
Author

@trjExpensify I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

@izarutskaya
Copy link
Author

We think this issue might be related to the #collect project.

@izarutskaya
Copy link
Author

Production

Recording.2418.mp4

@Nodebrute
Copy link
Contributor

Proposal

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

Add receipt placeholder is shown when receipt is not allowed when paying someone

What is the root cause of that problem?

const shouldShowReceiptEmptyState = !hasReceipt && !isInvoice && (canEditReceipt || isAdmin || isApprover);

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

We can get the type from parentReportAction which is pay in this case and use it here

const shouldShowReceiptEmptyState = !hasReceipt && !isInvoice && (canEditReceipt || isAdmin || isApprover);

We can also create a utility function for future cases.
Pseudocode

 const isPay = parentReportAction?.originalMessage?.type === 'pay'
 const shouldShowReceiptEmptyState = !isPay && !hasReceipt && !isInvoice && (canEditReceipt || isAdmin || isApprover);

We should also add this check here

{!isInvoice && (
<ReceiptAuditHeader
notes={noticeTypeViolations}
shouldShowAuditMessage={Boolean(shouldShowNotesViolations && didRceiptScanSucceed)}
/>
)}

We can hide the above part (total + separator) to make the view similar to invoices

What alternative solutions did you explore? (Optional)

@MariaHCD
Copy link
Contributor

MariaHCD commented May 2, 2024

This is related to the shouldShowEmptyReceiptState logic implemented in #37813

I think it makes sense to not show the receipt empty state if the IOU is already paid. cc: @cead22 @JmillsExpensify for confirmation on what the expected UI/UX should be here.

@MariaHCD
Copy link
Contributor

MariaHCD commented May 2, 2024

I also don't think this should necessarily block the deploy.

@MariaHCD MariaHCD added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels May 2, 2024
@cead22
Copy link
Contributor

cead22 commented May 2, 2024

If the receipt can't be added, then I agree we shouldn't show the empty state (cc @Krishna2323 @sobitneupane)

@Krishna2323
Copy link
Contributor

@cead22, thanks for the confirmation, will handle this one.

@cead22
Copy link
Contributor

cead22 commented May 2, 2024

Thanks

@cead22 cead22 added the External Added to denote the issue can be worked on by a contributor label May 2, 2024
@melvin-bot melvin-bot bot changed the title Pay someone - Add receipt placeholder is shown when receipt is not allowed when paying someone [$250] Pay someone - Add receipt placeholder is shown when receipt is not allowed when paying someone May 2, 2024
Copy link

melvin-bot bot commented May 2, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0172e358c2fd0ab1cb

Copy link

melvin-bot bot commented May 30, 2024

@MariaHCD @trjExpensify @sobitneupane @Krishna2323 this issue is now 4 weeks old, please consider:

  • Finding a contributor to fix the bug
  • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

@MariaHCD
Copy link
Contributor

The PR has been approved and merged

@trjExpensify trjExpensify added the Reviewing Has a PR in review label May 31, 2024
@trjExpensify
Copy link
Contributor

Chill Melv, awaiting a deploy.

Copy link

melvin-bot bot commented Jun 4, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 6, 2024
@melvin-bot melvin-bot bot changed the title [$250] Pay someone - Add receipt placeholder is shown when receipt is not allowed when paying someone [HOLD for payment 2024-06-13] [$250] Pay someone - Add receipt placeholder is shown when receipt is not allowed when paying someone Jun 6, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 6, 2024
Copy link

melvin-bot bot commented Jun 6, 2024

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

Copy link

melvin-bot bot commented Jun 6, 2024

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

If no regressions arise, payment will be issued on 2024-06-13. 🎊

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

Copy link

melvin-bot bot commented Jun 6, 2024

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:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
  • [@sobitneupane] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@sobitneupane] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@sobitneupane] Determine if we should create a regression test for this bug.
  • [@sobitneupane] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 12, 2024
Copy link

melvin-bot bot commented Jun 13, 2024

Payment Summary

Upwork Job

BugZero Checklist (@trjExpensify)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@melvin-bot melvin-bot bot added the Overdue label Jun 14, 2024
@Krishna2323
Copy link
Contributor

@trjExpensify, bump for payments.

Copy link

melvin-bot bot commented Jun 17, 2024

@MariaHCD, @trjExpensify, @sobitneupane, @Krishna2323 Huh... This is 4 days overdue. Who can take care of this?

@trjExpensify
Copy link
Contributor

Apols, I've been OoO. Payment summary as follows:

@sobitneupane go ahead and request, @Krishna2323 I've sent you an offer.

@melvin-bot melvin-bot bot removed the Overdue label Jun 18, 2024
@Krishna2323
Copy link
Contributor

@trjExpensify accepted, thanks.

@trjExpensify
Copy link
Contributor

Paid!

@sobitneupane
Copy link
Contributor

Regression Test Proposal:

  1. Go to FAB > Pay someone > Enter amount > Select user > Submit
  2. Open the paid IOU request > Verify Add receipt placeholder is not shown
  3. Open any paid or approved IOU report in paid policy that doesn't have any receipt
  4. Verify Add receipt placeholder is not shown

Do we agree 👍 or 👎

@JmillsExpensify
Copy link

$250 approved for @sobitneupane. Reopeninf for the decision on the regression test.

@trjExpensify
Copy link
Contributor

Regression test created, closing again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants