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.43k stars 2.8k forks source link

[$250] Expense - 'Pay elsewhere' button is present by default #50180

Open lanitochka17 opened 2 days ago

lanitochka17 commented 2 days 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: .0.44-3 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team

Issue found when executing PR https://github.com/Expensify/App/pull/49967

Action Performed:

Precondition: 2 new accounts

  1. User A create a workspace and invite user B to the workspace as an employee
  2. As user B, create an expense on the workspace
  3. As user A, confirm that you can see the expense that user B made
  4. As user A, go to Settings > Workspaces > your_workspace > More features and turn on "Workflows"
  5. Go to Workflows tab and turn on "Make or track payments"

Expected Result:

On step 3. There is no "Pay with Expensify" and/or "Pay elsewhere" button for the expense On step 5. "Make or track payments" is off

Actual Result:

On step 3. There is "Pay with Expensify" and/or "Pay elsewhere" button for the expense On step 5. "Make or track payments" is on

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/50c803b4-126a-448d-b7a8-8e2191309241

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021842318443819585425
  • Upwork Job ID: 1842318443819585425
  • Last Price Increase: 2024-10-04
Issue OwnerCurrent Issue Owner: @dukenv0307
melvin-bot[bot] commented 2 days ago

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

lanitochka17 commented 2 days ago

@adelekennedy 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

melvin-bot[bot] commented 1 day ago

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

melvin-bot[bot] commented 1 day ago

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

truph01 commented 16 hours ago

Proposal

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

On step 3. There is "Pay with Expensify" and/or "Pay elsewhere" button for the expense On step 5. "Make or track payments" is on

What is the root cause of that problem?

  1. Solution 2:

https://github.com/Expensify/App/blob/10b8547c3fdad76e9a6f1986edef5b94507e1ae6/src/libs/actions/Policy/Policy.ts#L2887

  1. Solution 3:

https://github.com/Expensify/App/blob/10b8547c3fdad76e9a6f1986edef5b94507e1ae6/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx#L267

to:

                isActive: policy?.reimbursementChoice !== CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_NO && !!policy?.reimbursementChoice,

What alternative solutions did you explore? (Optional)