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.5k stars 2.85k forks source link

[$250] All - Approver Flow - Admin has 2 payment options if Reimbursements is set to Indirect #47823

Open IuliiaHerets opened 2 months 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: 9.0.23-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4879259 Email or phone of affected tester (no customers): fischer9966+082124aadm@gmail.com Issue reported by: Applause Internal Team

Action Performed:

Precondition NewDot:

  1. Create admin account with Gmail
  2. Create Collect workspace, set Workflows to enabled
  3. Invite Employee with Gmail accounts to this workspace
  4. Enable Approvals in Workflows and set Admin as Approver
  5. Enable Workflows > Delay submissions and set it to Manually

Precondition OldDot:

  1. Login to OD as admin
  2. Go to Collect workspace > Reimbursements
  3. Select "Indirect"

Steps NewDot:

  1. Go to staging.new.expensify.com or open App
  2. Login as the employee and submit a report
  3. Login as the Admin and approve the report
  4. Verify the admin only has one payment option - "Pay Elsewhere"

Expected Result:

Admin only has one payment option "Pay Elsewhare" if Reimbursements is set to Indirect

Actual Result:

Admin has 2 payment options - "Pay Elsewhare" and "Pay with Expensify" if Reimbursements is set to Indirect

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/064f098a-e711-4e05-ac4d-a55fb8beef72

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d0a122b57dabf58d
  • Upwork Job ID: 1826688249351475147
  • Last Price Increase: 2024-08-22
  • Automatic offers:
    • mkhutornyi | Reviewer | 103689004
melvin-bot[bot] commented 2 months ago

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

IuliiaHerets commented 2 months ago

@lschurr FYI 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

daledah commented 2 months ago

Proposal

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

Admin has 2 payment options - "Pay Elsewhare" and "Pay with Expensify" if Reimbursements is set to Indirect

What is the root cause of that problem?

The condition to show Pay with Expensify does not include the case of Indirect reimbursements:

https://github.com/Expensify/App/blob/305057b2cabae0d5a377d660b303aa19ecba7a6b/src/components/SettlementButton.tsx#L156

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

Update shouldShowPaywithExpensifyOption to check if policy's reimbursementChoice is NOT reimburseManual (Indirect).

!shouldHidePaymentOptions && ReportUtils.isPayer(session, iouReport) && policy?.reimbursementChoice !== CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_MANUAL
melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

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

mkhutornyi commented 2 months ago

@daledah's proposal looks good as per Expected Result: Admin only has one payment option "Pay Elsewhare" if Reimbursements is set to Indirect πŸŽ€πŸ‘€πŸŽ€ C+ reviewed

melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

πŸ“£ @mkhutornyi πŸŽ‰ 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

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 πŸ“–

lschurr commented 2 months ago

Looks like this was just assigned today. @daledah let us know when you have a PR up!

daledah commented 2 months ago

@mkhutornyi This PR is ready. cc @lschurr

melvin-bot[bot] commented 1 month ago

This issue has not been updated in over 15 days. @yuwenmemon, @lschurr, @mkhutornyi, @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!