You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-03-02] Expense - "You rejected this report" appears in report after admin reopens report #82744
👋 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:
Identify the pull request that introduced this issue and revert it.
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
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.
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"
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.
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.
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
Activity
melvin-bot commentedon Feb 18, 2026
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.melvin-bot commentedon Feb 18, 2026
Triggered auto assignment to @cristipaval (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Feb 18, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Feb 18, 2026
👋 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:
OSBotify commentedon Feb 18, 2026
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
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.
Related Code: The display logic in
src/libs/ReportNameUtils.ts(functioncomputeReportNameBasedOnReportAction) handles both REJECTED and RETRACTED actions separately:REJECTED→ shows "rejected this report"RETRACTED→ shows "retracted"REOPENED→ shows "reopened"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
reopenReportfunction insrc/libs/actions/IOU/index.tsbut was merged on Feb 6 and is NOT in the current staging deploy.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
Next Steps
@jponikarchuk Could you provide more details:
Labels: No label changes made - keeping both blocker labels until root cause is identified with high confidence.
MelvinBot commentedon Feb 18, 2026
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
REJECTEDreport action is never cleaned up after reopen.The
REJECTEDreport action (created server-side when an approver rejects a report) persists in the report actions collection indefinitely. WhenreopenReport()is called (src/libs/actions/IOU/index.ts:10872-11053), it only creates a newREOPENEDreport action and sets the report state to OPEN — it does not remove, hide, or filter the priorREJECTEDaction.The rendering in
PureReportActionItem.tsx:1414-1415unconditionally displays anyREJECTEDaction as "rejected this report":There is no filtering logic in
shouldReportActionBeVisible()(ReportActionsUtils.ts:1082-1157) that checks whether aREJECTEDaction should be hidden when a subsequentREOPENEDaction exists.2. The Reopen button is mislabeled as "Retract".
In
MoneyReportHeader.tsx:1541-1542, the Reopen secondary action usestranslate('iou.retract')as its button text instead oftranslate('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
computeReportNameBasedOnReportActionfunction insrc/libs/ReportNameUtils.ts:375-412determines the report name based on theparentReportAction. The parent report action (in the chat report) points to the last workflow action. When the admin reopens the report, the server should update theparentReportActionIDto point to the newREOPENEDaction. If the server is not doing this, the client should check if aREOPENEDaction exists after theREJECTEDaction and display the reopened state instead.The fix should be in one of these locations:
src/libs/ReportNameUtils.ts:404-406— IncomputeReportNameBasedOnReportAction, when checking forREJECTED, also verify the report hasn't been reopened (checkreport.statusNum !== CLOSEDor check if aREOPENEDaction exists after theREJECTEDone)ReopenReportAPI command should update the report'sparentReportActionIDto point to theREOPENEDaction instead of the oldREJECTEDactionSecondary fix (label bug) — In
src/components/MoneyReportHeader.tsx:1542, changetranslate('iou.retract')totranslate('iou.reopenReport')for theREOPENsecondary action.What alternative solutions did you explore? (Optional)
shouldReportActionBeVisible: Could add logic to hideREJECTEDactions when a subsequentREOPENEDaction exists. However, this would remove the audit trail from the report timeline, which may not be desired.shouldShowflag: The server could setshouldShow: falseon theREJECTEDaction whenReopenReportis processed. This approach would be cleaner but requires a server-side change.Relevant Code
src/libs/ReportNameUtils.ts:404-406—REJECTEDcheck incomputeReportNameBasedOnReportActionsrc/pages/inbox/report/PureReportActionItem.tsx:1414-1415— Unconditional rendering ofREJECTEDactionsrc/libs/actions/IOU/index.ts:10872-11053—reopenReport()does not clean upREJECTEDactionssrc/libs/ReportActionsUtils.ts:1082-1157—shouldReportActionBeVisible()has no special handling forREJECTEDafter reopensrc/components/MoneyReportHeader.tsx:1541-1542— Reopen button mislabeled as "Retract"Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.16 remaining items
hoangzinh commentedon Feb 24, 2026
@luacmartins can you assign me to this issue, please? I helped to review PR
luacmartins commentedon Feb 24, 2026
Done
hoangzinh commentedon Feb 25, 2026
PR is deployed to Prod
[-]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[/+]NicMendonca commentedon Mar 5, 2026
Payment Summary
garrettmknight commentedon Mar 10, 2026
$250 approved for @hoangzinh