Skip to content

[Due for payment 2026-03-02] Expense - "You rejected this report" appears in report after admin reopens report #82744

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.3.21-0
Reproducible in staging?: Yes
Reproducible in production?: No
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-5545/folder/13176741/41237125/1196512676
Email or phone of affected tester (no customers): sjiondjsondjoisjsojdos@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Disable Approvals and Payments in Workflows.
  • Admin invites member to the workspace.
  1. Go to staging.new.expensify.com
  2. [Member] Go to workspace chat.
  3. [Member] Create an expense.
  4. [Member] Click Submit on the expense preview.
  5. [Admin] Open member's expense report.
  6. [Admin] Click More > Retract.
  7. [Admin] Close and reopen the report.

Expected Result:

"You rejected this report" will not appear in the expense report after admin reopens report.

Actual Result:

"You rejected this report" appears in bold in the expense report after admin reopens report.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @NicMendonca

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 18, 2026
  2. melvin-bot commented on Feb 18, 2026

    @melvin-bot

    Triggered auto assignment to @NicMendonca (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 Feb 18, 2026

    @melvin-bot

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

  4. melvin-bot commented on Feb 18, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Feb 18, 2026

    @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.
  6. OSBotify commented on Feb 18, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Needs Investigation
    Causing PR: Unable to determine with high confidence
    Reproducibility: Staging only (not on production)

    Recommendation: NEEDS INVESTIGATION

    The bug involves incorrect report state display after reopening a retracted report. After reviewing the StagingDeployCash PRs, I could not identify a clear causing PR that modifies the retract/reject/reopen functionality in the current staging deploy (v9.3.21-0).

    Key Findings

    1. Bug Symptoms: After admin retracts a report and reopens it, the message "You rejected this report" appears instead of the expected message. This suggests potential confusion between RETRACTED and REJECTED action types.

    2. Related Code: The display logic in src/libs/ReportNameUtils.ts (function computeReportNameBasedOnReportAction) handles both REJECTED and RETRACTED actions separately:

      • Line 404: REJECTED → shows "rejected this report"
      • Line 407: RETRACTED → shows "retracted"
      • Line 410: REOPENED → shows "reopened"
    3. Relevant PR (Not in Staging): PR fix: New expense is not added to the retracted report #81237 "fix: New expense is not added to the retracted report" modified the reopenReport function in src/libs/actions/IOU/index.ts but was merged on Feb 6 and is NOT in the current staging deploy.

    4. PRs Reviewed: Checked all PRs in the staging deploy checklist including performance optimization PRs ([No QA] perf: optimize accessing report summaries #82545, [No QA] perf: replace reportsSelector with useReportAttributes hook #82551, perf: add useMappedPolicies hook #82563) and context splitting PR (Split contexts to state and actions - Batch 2 #81986), but none directly modify retract/reject/reopen logic.

    Possible Root Causes

    1. Backend Issue: The API might be returning the wrong action type (REJECTED instead of RETRACTED) after reopening
    2. State Management Issue: Report state might not be correctly updated after the reopen operation
    3. Display Logic Issue: The logic determining which message to show might be using stale or incorrect data

    Next Steps

    1. Need to verify with backend team if there were any recent API changes to the reopen/retract endpoints
    2. Tag PR authors of recent report-related changes for input
    3. Check if this is a data issue specific to certain workspace configurations

    @jponikarchuk Could you provide more details:

    • What is the exact message that appears? Is it showing in the report header, expense preview, or elsewhere?
    • Does this happen for all retracted reports or only under specific conditions (e.g., specific workspace settings)?
    • Are there any console errors when reproducing the issue?

    Labels: No label changes made - keeping both blocker labels until root cause is identified with high confidence.

  7. MelvinBot commented on Feb 18, 2026

    @MelvinBot
    Contributor

    Proposal

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

    When an admin clicks "Retract" (which is actually the Reopen action — labeled "Retract" due to a UI text bug) on a member's expense report, the message "You rejected this report" appears in the expense report after the admin reopens it. This message should not persist after reopening.

    What is the root cause of that problem?

    There are two issues at play:

    1. The REJECTED report action is never cleaned up after reopen.

    The REJECTED report action (created server-side when an approver rejects a report) persists in the report actions collection indefinitely. When reopenReport() is called (src/libs/actions/IOU/index.ts:10872-11053), it only creates a new REOPENED report action and sets the report state to OPEN — it does not remove, hide, or filter the prior REJECTED action.

    The rendering in PureReportActionItem.tsx:1414-1415 unconditionally displays any REJECTED action as "rejected this report":

    } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.REJECTED) {
        children = <ReportActionItemBasicMessage message={translate('iou.rejectedThisReport')} />;
    

    There is no filtering logic in shouldReportActionBeVisible() (ReportActionsUtils.ts:1082-1157) that checks whether a REJECTED action should be hidden when a subsequent REOPENED action exists.

    2. The Reopen button is mislabeled as "Retract".

    In MoneyReportHeader.tsx:1541-1542, the Reopen secondary action uses translate('iou.retract') as its button text instead of translate('iou.reopenReport'). This explains why the issue reporter says the admin clicks "Retract" — they are actually clicking Reopen.

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

    Primary fix — The computeReportNameBasedOnReportAction function in src/libs/ReportNameUtils.ts:375-412 determines the report name based on the parentReportAction. The parent report action (in the chat report) points to the last workflow action. When the admin reopens the report, the server should update the parentReportActionID to point to the new REOPENED action. If the server is not doing this, the client should check if a REOPENED action exists after the REJECTED action and display the reopened state instead.

    The fix should be in one of these locations:

    • src/libs/ReportNameUtils.ts:404-406 — In computeReportNameBasedOnReportAction, when checking for REJECTED, also verify the report hasn't been reopened (check report.statusNum !== CLOSED or check if a REOPENED action exists after the REJECTED one)
    • Server-side — The ReopenReport API command should update the report's parentReportActionID to point to the REOPENED action instead of the old REJECTED action

    Secondary fix (label bug) — In src/components/MoneyReportHeader.tsx:1542, change translate('iou.retract') to translate('iou.reopenReport') for the REOPEN secondary action.

    What alternative solutions did you explore? (Optional)

    • Client-side filtering in shouldReportActionBeVisible: Could add logic to hide REJECTED actions when a subsequent REOPENED action exists. However, this would remove the audit trail from the report timeline, which may not be desired.
    • Hiding via shouldShow flag: The server could set shouldShow: false on the REJECTED action when ReopenReport is processed. This approach would be cleaner but requires a server-side change.

    Relevant Code

    • src/libs/ReportNameUtils.ts:404-406 — REJECTED check in computeReportNameBasedOnReportAction
    • src/pages/inbox/report/PureReportActionItem.tsx:1414-1415 — Unconditional rendering of REJECTED action
    • src/libs/actions/IOU/index.ts:10872-11053 — reopenReport() does not clean up REJECTED actions
    • src/libs/ReportActionsUtils.ts:1082-1157 — shouldReportActionBeVisible() has no special handling for REJECTED after reopen
    • src/components/MoneyReportHeader.tsx:1541-1542 — Reopen button mislabeled as "Retract"

    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.

  8. 16 remaining items

  9. hoangzinh commented on Feb 24, 2026

    @hoangzinh
    Contributor

    @luacmartins can you assign me to this issue, please? I helped to review PR

  10. luacmartins commented on Feb 24, 2026

    @luacmartins
    Contributor

    Done

  11. hoangzinh commented on Feb 25, 2026

    @hoangzinh
    Contributor

    PR is deployed to Prod

  12. changed the title [-]Expense - "You rejected this report" appears in report after admin reopens report[/-] [+][Due for payment 2026-03-02] Expense - "You rejected this report" appears in report after admin reopens report[/+] on Mar 3, 2026
  13. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed
    ReviewingHas a PR in review
    on Mar 3, 2026
  14. NicMendonca commented on Mar 5, 2026

    @NicMendonca
    Contributor

    Payment Summary

  15. garrettmknight commented on Mar 10, 2026

    @garrettmknight
    Contributor

    $250 approved for @hoangzinh

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.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions