Skip to content

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

Closed

Description

@m-natarajan

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

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Aug 8, 2024
  2. melvin-bot commented on Aug 8, 2024

    @melvin-bot

    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.

  3. melvin-bot commented on Aug 8, 2024

    @melvin-bot

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

  4. github-actions commented on Aug 8, 2024

    @github-actions
    Contributor

    👋 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.
  5. dominictb commented on Aug 8, 2024

    @dominictb
    Contributor

    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)

  6. dominictb commented on Aug 8, 2024

    @dominictb
    Contributor
  7. rezkiy37 commented on Aug 8, 2024

    @rezkiy37
    Contributor

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

    cc @madmax330

  8. MonilBhavsar commented on Aug 8, 2024

    @MonilBhavsar
    Contributor

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

  9. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    DeployBlockerIndicates it should block deploying the API
    on Aug 8, 2024
  10. rezkiy37 commented on Aug 8, 2024

    @rezkiy37
    Contributor

    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?

  11. MonilBhavsar commented on Aug 12, 2024

    @MonilBhavsar
    Contributor

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

  12. rezkiy37 commented on Aug 12, 2024

    @rezkiy37
    Contributor

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

  13. MonilBhavsar commented on Aug 13, 2024

    @MonilBhavsar
    Contributor
  14. rezkiy37 commented on Aug 13, 2024

    @rezkiy37
    Contributor
  15. MonilBhavsar commented on Aug 13, 2024

    @MonilBhavsar
    Contributor

    Thanks! Closing this out then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions