Skip to content

[Due for payment 2025-11-12] [$250] Invoice - Delete option is missing in More menu of an unpaid invoice report #72212

Closed

Description

@jponikarchuk

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.2.28-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-1221/folder/13176671/41237464/941908676
Email or phone of affected tester (no customers): sdjoisjdnoidjoisjdi@gmail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.5 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Invoice is enabled.
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > More features.
  3. Disable Workflows.
  4. Open FAB > Send invoice.
  5. Send an invoice to any user.
  6. Go to Reports.
  7. Search with type:invoice.
  8. Select the invoice via checkbox > Click dropdown button.
    → Delete option is present on Reports > Invoices.
  9. Go to Inbox.
  10. Open the invoice thread.
  11. Click More.

Expected Result:

Delete option will be present in More menu

Actual Result:

Delete option is missing in More menu.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021978623247997152112
  • Upwork Job ID: 1978623247997152112
  • Last Price Increase: 2025-10-16
  • Automatic offers:
    • etCoderDysto | Contributor | 109177600
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @trjExpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 9, 2025
  2. melvin-bot commented on Oct 9, 2025

    @melvin-bot

    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.

  3. etCoderDysto commented on Oct 9, 2025

    @etCoderDysto
    Contributor

    Proposal

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

    Invoice - Delete option is missing in More menu when Workflows are disabled

    What is the root cause of that problem?

    We have policy?.approvalMode !== CONST.POLICY.APPROVAL_MODE.OPTIONAL check here. And when we disable workflow, policy?.approvalMode will be optional

    App/src/libs/ReportUtils.ts

    Lines 2683 to 2684 in f50b779

    if (isInvoiceReport(report)) {
    return report?.ownerAccountID === currentUserAccountID && isReportOpenOrProcessing && policy?.approvalMode !== CONST.POLICY.APPROVAL_MODE.OPTIONAL;

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

    We should remove the check

    if (isInvoiceReport(report)) {
            return report?.ownerAccountID === currentUserAccountID && isReportOpenOrProcessing;
    

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    We can write a test that asserts that canDeleteMoneyRequestReport will return true for invoice report when workflow is disabled

    What alternative solutions did you explore? (Optional)

  4. Eskalifer1 commented on Oct 9, 2025

    @Eskalifer1
    Contributor

    Proposal

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

    Invoice - Delete option is missing in More menu when Workflows are disabled

    What is the root cause of that problem?

    We dont check here if workflows are enabled

    App/src/libs/ReportUtils.ts

    Lines 2683 to 2685 in f50b779

    if (isInvoiceReport(report)) {
    return report?.ownerAccountID === currentUserAccountID && isReportOpenOrProcessing && policy?.approvalMode !== CONST.POLICY.APPROVAL_MODE.OPTIONAL;
    }

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

    We should check if workflows are enabled And if they are enabled, only then check approvalMode. Here is an example of the code::

    if (isInvoiceReport(report)) {
            return report?.ownerAccountID === currentUserAccountID && isReportOpenOrProcessing &&  (!policy?.areWorkflowsEnabled || policy?.approvalMode !== CONST.POLICY.APPROVAL_MODE.OPTIONAL);
        }

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    N/A

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  5. trjExpensify commented on Oct 13, 2025

    @trjExpensify
    Contributor

    Mhm... @cristipaval @joekaufmanexpensify for a hipcheck...

    1. The invoice was submitted (thus processing) and waiting on someone to pay it
    2. Disabling workflows doesn't mean anything for the Invoice report.
    3. Thus, they should be able to delete a submitted invoice report?
    4. Seems like they can from the Reports page, but not from the More menu on the invoice report itself?
  6. cristipaval commented on Oct 14, 2025

    @cristipaval
    Contributor
    • Invoices should be completely decoupled from Workflows.
    • Deleting an invoice should behave similarly to deleting an expense report.
  7. trjExpensify commented on Oct 16, 2025

    @trjExpensify
    Contributor

    Cool, thanks!

  8. changed the title [-]Invoice - Delete option is missing in More menu when Workflows are disabled[/-] [+]Invoice - Delete option is missing in More menu of an unpaid invoice report[/+] on Oct 16, 2025
  9. 44 remaining items

  10. changed the title [-][$250] Invoice - Delete option is missing in More menu of an unpaid invoice report[/-] [+][Due for payment 2025-11-12] [$250] Invoice - Delete option is missing in More menu of an unpaid invoice report[/+] on Nov 5, 2025
  11. melvin-bot commented on Nov 5, 2025

    @melvin-bot

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

  12. melvin-bot commented on Nov 5, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.44-5 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 2025-11-12. 🎊

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

  13. melvin-bot commented on Nov 5, 2025

    @melvin-bot

    @suneox @trjExpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  14. suneox commented on Nov 11, 2025

    @suneox
    Contributor

    BugZero Checklist

    • [Contributor] 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: Unable to identify the specific offending PR with certainty — it seems this logic has been in place for quite some time, and we’ve recently updated the logic related to displaying the delete action.

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal

    Precondition:

    • Invoice feature is enabled

    Test:

    1. Go to staging.new.expensify.com
    2. Go to workspace settings > More features.
    3. Disable Workflows.
    4. Open FAB > Send invoice.
    5. Send an invoice to any user.
    6. Go to Reports.
    7. Search with type:invoice.
    8. Select the invoice via checkbox > Click dropdown button.
    9. Go to Inbox.
    10. Open the invoice thread.
    11. Click More.

    Expected Result: Delete option will be present in More menu

    Do we agree 👍 or 👎

  15. trjExpensify commented on Nov 12, 2025

    @trjExpensify
    Contributor

    We're not really focused on Invoices right now, so I'm going to forgo the test.

    Payment summary as follows:

    All settled up, closing.

  16. moved this from Bugs and Follow Up Issues to Done in #expensify-bugson Nov 12, 2025
  17. garrettmknight commented on Dec 7, 2025

    @garrettmknight
    Contributor

    $250 approved for @suneox

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions