Skip to content

[Due for payment 2025-12-03] [$250] Expense - Delete option is missing in More menu after bypassing approver #73554

Closed

Description

@nlemma

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.38-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: #72682
Email or phone of affected tester (no customers): dsniojosinjdoisj@gmail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.5 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Admin invites member to the workspace.
  • The invited member is the approver.
  • Perform the following steps as admin:
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create an expense in the workspace chat.
  4. Open the expense report.
  5. Click Submit.
  6. Click More > Change approver.
  7. Click Bypass approvers.
  8. Click Change approver.
  9. Click More.
    BUG: Delete option is missing.
  10. Go back to main workspace chat.
  11. Right click on the expense preview.
    → Delete option is present - Expected.

Expected Result:

In Step 10, after bypassing approver, Delete option will be present in More menu because the report is not approved yet.

Actual Result:

In Step 10, after bypassing approver, 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

Bug6985002_1761496169295.8.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021983556846733895088
  • Upwork Job ID: 1983556846733895088
  • Last Price Increase: 2025-11-05
Issue OwnerCurrent Issue Owner: @coderyak

Activity

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

    @melvin-bot

    Triggered auto assignment to @sakluger (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. coderyak commented on Oct 27, 2025

    @coderyak
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-10-29 20:11:56 UTC.

    Proposal

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

    After bypassing approvers on an expense report, the Delete option is missing from the More menu even though the report has not been approved yet. The Delete option should be present because the report is still in a deletable state.

    What is the root cause of that problem?

    The issue occurs in the canDeleteMoneyRequestReport function in src/libs/ReportUtils.ts. The delete permission for expense reports is gated by a forwarding check instead of the report lifecycle. Concretely, the existing logic returns:

    isReportSubmitter && isReportOpenOrProcessing && !isForwarded
    

    This makes the Delete option depend on whether the report has been forwarded, which is unnecessary for the intended behavior. What we expect is that the submitter should be able to delete any outstanding report (Open or Submitted) until it is approved/finished, regardless of whether it was forwarded or bypassed.

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

    Remove the forwarding-based gate entirely and base deletion solely on submitter + lifecycle (Open or Submitted).

    Update the expense-report branch in canDeleteMoneyRequestReport:

    From:

    const isForwarded = isProcessingReport(report) && isApprovalEnabled && !isAwaitingFirstLevelApproval(report);
    return isReportSubmitter && isReportOpenOrProcessing && !isForwarded;

    To:

    return isReportSubmitter && isReportOpenOrProcessing;

    What alternative solutions did you explore? (Optional)

    None

  4. sakluger commented on Oct 27, 2025

    @sakluger
    Contributor

    I'm not sure if an admin should be able to delete an Outstanding report. Checking in Slack: https://expensify.slack.com/archives/C03U7DCU4/p1761577613486879

  5. sakluger commented on Oct 29, 2025

    @sakluger
    Contributor

    I confirmed that a user should be able to delete an outstanding report as long as it has not been approved by anyone yet. So the expected behavior described above is correct.

    Adding the external label.

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Oct 29, 2025
  7. changed the title [-]Expense - Delete option is missing in More menu after bypassing approver[/-] [+][$250] Expense - Delete option is missing in More menu after bypassing approver[/+] on Oct 29, 2025
  8. melvin-bot commented on Oct 29, 2025

    @melvin-bot
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Oct 29, 2025
  10. melvin-bot commented on Oct 29, 2025

    @melvin-bot

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

  11. coderyak commented on Oct 29, 2025

    @coderyak
    Contributor

    Proposal

    Updated based on @sakluger's input.

  12. melvin-bot commented on Nov 4, 2025

    @melvin-bot

    @ZhenjaHorbach Eep! 4 days overdue now. Issues have feelings too...

  13. 28 remaining items

  14. melvin-bot commented on Nov 26, 2025

    @melvin-bot

    @ZhenjaHorbach @sakluger 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]

  15. ZhenjaHorbach commented on Dec 2, 2025

    @ZhenjaHorbach
    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.

    https://github.com/Expensify/App/pull/70349/files#r2582171149

    • [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: NA

    • [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:

    • Admin invites a member to the workspace
    • The invited member is set as the approver

    Test:

    1. Open a workspace chat
    2. Create an expense in the workspace chat
    3. Open the expense report
    4. Click Submit
    5. Click More > Change approver
    6. Add approver
    7. Click change approver
    8. Click more
    9. Verify the Delete option is now present in the More menu
    10. Click More > Change approver
    11. Click Bypass approvers
    12. Click Change approver
    13. Click More
    14. Verify the Delete option is now present in the More menu

    Do we agree 👍 or 👎

  16. sakluger commented on Dec 3, 2025

    @sakluger
    Contributor

    Hi @coderyak could you please post your Upwork profile here so I can send you an offer?

  17. sakluger commented on Dec 3, 2025

    @sakluger
    Contributor

    Payment Summary

    Contributor: @coderyak due $250 via Upwork: Paid
    Contributor+: @ZhenjaHorbach due $250 via Newdot

  18. melvin-bot commented on Dec 3, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@sakluger)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1983556846733895088/hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  19. coderyak commented on Dec 4, 2025

    @coderyak
    Contributor

    Hi @coderyak could you please post your Upwork profile here so I can send you an offer?

    @sakluger sure, here

  20. sakluger commented on Dec 4, 2025

    @sakluger
    Contributor

    Thanks @coderyak! I've sent you an offer here. Please let me know once you've accepted it.

  21. ZhenjaHorbach commented on Dec 4, 2025

    @ZhenjaHorbach
    Contributor

    Requested in ND!

  22. coderyak commented on Dec 5, 2025

    @coderyak
    Contributor

    Thanks @coderyak! I've sent you an offer here. Please let me know once you've accepted it.

    @sakluger thanks for the offer, I've accepted it!!

  23. JmillsExpensify commented on Dec 5, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @ZhenjaHorbach

  24. sakluger commented on Dec 5, 2025

    @sakluger
    Contributor

    I completed the Upwork payment, all done here!

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