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

Invoice - Send invoice option is present when the workspace has not enabled Invoices feature #47023

Closed
6 tasks done
m-natarajan opened this issue Aug 8, 2024 · 13 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering

Comments

@m-natarajan
Copy link

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Issue found when validating #46567
Version Number: 9.0.18-0
Reproducible in staging?: Y
Reproducible in production?: New Feature
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers): applausetester+kh050806@applause.expensifail.com
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. Delete all workspaces if there is any workspace.
  3. Create a new workspace.
  4. Go to Workspace settings > More features.
  5. Note that Invoices feature is not enabled.
  6. Go to FAB.

Expected Result:

Send invoice option will not show up if the workspace has not enabled Invoices feature.

Actual Result:

Send invoice option is present when the workspace has not enabled Invoices feature.
The option is also present in invoice room when the workspace has not enabled Invoices feature.

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6565089_1723074934706.20240808_075207.mp4

View all open jobs on GitHub

@m-natarajan m-natarajan added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Aug 8, 2024
Copy link

melvin-bot bot commented Aug 8, 2024

Triggered auto assignment to @kadiealexander (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 Aug 8, 2024

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

Copy link
Contributor

github-actions bot commented Aug 8, 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.

@dominictb
Copy link
Contributor

dominictb commented Aug 8, 2024

Edited by proposal-police: This proposal was edited at 2024-08-08 03:40:50 UTC.

Proposal

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

Send invoice option is present when the workspace has not enabled Invoices feature.
The option is also present in invoice room when the workspace has not enabled Invoices feature.

What is the root cause of that problem?

In:

if (isPolicyAdmin(report?.policyID ?? '-1', allPolicies)) {

we don't check the policy.invoicingEnabled

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

We can uncomment these lines:

// if (PolicyUtils.canSendInvoiceFromWorkspace(policy?.id) && isPolicyAdmin(report?.policyID ?? '-1', allPolicies)) {

// return getActiveAdminWorkspaces(policies).some((policy) => canSendInvoiceFromWorkspace(policy.id));

// .filter((policy) => PolicyUtils.canSendInvoiceFromWorkspace(policy.id));

// && PolicyUtils.canSendInvoiceFromWorkspace(reportOption.policyID);

What alternative solutions did you explore? (Optional)

@dominictb
Copy link
Contributor

Proposal updated

@rezkiy37
Copy link
Contributor

rezkiy37 commented Aug 8, 2024

It is expected behavior for now. Please read this - #46567 (comment).

cc @madmax330

@MonilBhavsar
Copy link
Contributor

Okay, thanks for clarifying @rezkiy37! Do we have another issue to clean that up or should I assign you to this issue?

@MonilBhavsar MonilBhavsar added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 DeployBlocker Indicates it should block deploying the API labels Aug 8, 2024
@rezkiy37
Copy link
Contributor

rezkiy37 commented Aug 8, 2024

Okay, thanks for clarifying @rezkiy37! Do we have another issue to clean that up or should I assign you to this issue?

Seems like we don't have an issue to clean up. Can we create it and add it to the proper project and #45182, @madmax330?

@melvin-bot melvin-bot bot added the Overdue label Aug 12, 2024
@MonilBhavsar
Copy link
Contributor

I think we should be able to use this, if we don't have any and link it to the tracking

@melvin-bot melvin-bot bot removed the Overdue label Aug 12, 2024
@rezkiy37
Copy link
Contributor

I want to close this issue. Let me create a clean-up issue tomorrow 🙂

@MonilBhavsar
Copy link
Contributor

cc @madmax330 ^

@rezkiy37
Copy link
Contributor

I've created #47302.

cc @MonilBhavsar @madmax330

@MonilBhavsar
Copy link
Contributor

Thanks! Closing this out then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering
Projects
None yet
Development

No branches or pull requests

5 participants