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
Expense- Report field is disabled when per diem rates are removed, but Move to report is shown #85014
Version Number: 9.3.36-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#84512 Email or phone of affected tester (no customers):sjodijsnodijdnoijsido@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:
Workspace has per diem rates.
Go to staging.new.expensify.com
Go to self DM.
Create a per diem expense.
Go to workspace settings > Per diem.
Delete all per diem rates.
Go back to self DM.
Open the per diem expense.
→ Report field is disabled because per diem rates are removed - Expected.
Click More > Move to report.
Expected Result:
Move to report should also be hidden as it has the same functionality as Report field.
Actual Result:
Report field is disabled when per diem rates are removed, but Move to report is shown.
👋 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: Frontend bug Causing PR: #84512 - "Feat: Add 'Move to report' in the 'More' menu of a one-expense report" by @nyomanjyotisa (High confidence) Related Issues: None
Recommendation: REVERT
PR #84512 added the "Move to report" functionality but is missing a critical check for per diem expenses. When per diem rates are deleted from a workspace, the "Move to report" option should be hidden (just like the Report field is disabled), but the PR only checks canEditFieldOfMoneyRequest without the additional per diem validation.
Labels: Removing DeployBlocker label (backend is not involved). Keeping DeployBlockerCash (App deploy blocked).
Detailed Analysis
Evidence
The bug occurs when:
A workspace has a per diem expense
All per diem rates are deleted from the workspace
The Report field correctly becomes disabled
However, "Move to report" in More menu is still shown
This is a regression introduced by PR #84512 which added "Move to report" functionality for single-expense reports.
Verification
In src/components/ReportActionItem/MoneyRequestView.tsx (lines 371-383), the Report field check includes:
The additional check (!isPerDiemRequest || canSubmitPerDiemExpenseFromWorkspace(policy) || ...) ensures per diem expenses cannot be moved when rates are deleted.
However, PR #84512 added the "Move to report" functionality in:
src/libs/ReportSecondaryActionUtils.ts (lines 964-976 in the PR diff)
src/components/MoneyReportHeader.tsx
src/components/MoneyRequestHeader.tsx
These locations only check canEditFieldOfMoneyRequest() and canUserPerformWriteAction(), but do NOT include the per diem rate validation that exists for the Report field.
Root Cause
The function canEditFieldOfMoneyRequest() in ReportUtils.ts handles the REPORT field edit permission (lines 4936-4989), but it does not check whether per diem rates still exist in the policy. This check is implemented separately in MoneyRequestView.tsx via canSubmitPerDiemExpenseFromWorkspace(policy).
When PR #84512 added "Move to report", it reused canEditFieldOfMoneyRequest() without adding the additional per diem rate check, causing the inconsistency where:
Report field: disabled (has the check)
Move to report: shown (missing the check)
Fix Requirements
The fix should add the per diem rate validation to the "Move to report" logic, matching the Report field behavior:
Please re-state the problem that we are trying to solve in this issue.
When per diem rates are deleted from a workspace, the Report field on an existing per diem expense is correctly disabled, but the "Move to report" option in the More menu remains visible. "Move to report" should be hidden because it has the same functionality as the Report field.
What is the root cause of that problem?
PR #84512 added the MOVE_EXPENSE secondary action to the "More" menu. The visibility check uses only canEditFieldOfMoneyRequest(reportAction, CONST.EDIT_REQUEST_FIELD.REPORT, ...), which does not check whether per diem rates are available on the policy.
In contrast, the Report field in MoneyRequestView.tsx (line 371-383) layers an additional per diem guard on top of canEditFieldOfMoneyRequest:
canSubmitPerDiemExpenseFromWorkspace (PolicyUtils.ts:1224-1227) returns false when per diem rates are removed because getPerDiemCustomUnit(policy) returns empty/undefined. This guard is what correctly disables the Report field — but this same guard is missing from the new MOVE_EXPENSE action in three places:
ReportSecondaryActionUtils.ts — getSecondaryTransactionThreadActions (controls the "More" menu on individual expense view)
ReportSecondaryActionUtils.ts — getSecondaryReportActions (controls the "More" menu on one-expense report view)
MoneyReportHeader.tsx — canMoveSingleExpense (additional visibility check for the report-level "More" menu)
What changes do you think we should make in order to solve the problem?
Add the per diem rate availability check to the MOVE_EXPENSE visibility logic in ReportSecondaryActionUtils.ts, in both getSecondaryTransactionThreadActions and getSecondaryReportActions. Specifically, before pushing MOVE_EXPENSE, add a check: if the transaction is a per diem request (via isPerDiemRequest from TransactionUtils), also require that canSubmitPerDiemExpenseFromWorkspace(policy) returns true (from PolicyUtils). This mirrors the existing guard used by the Report field in MoneyRequestView.tsx.
The same check should also be added to canMoveSingleExpense in MoneyReportHeader.tsx for consistency.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
Activity
melvin-bot commentedon Mar 12, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #84512
melvin-bot commentedon Mar 12, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Mar 12, 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 Mar 12, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #84512 - "Feat: Add 'Move to report' in the 'More' menu of a one-expense report" by @nyomanjyotisa (High confidence)
Related Issues: None
Recommendation: REVERT
PR #84512 added the "Move to report" functionality but is missing a critical check for per diem expenses. When per diem rates are deleted from a workspace, the "Move to report" option should be hidden (just like the Report field is disabled), but the PR only checks
canEditFieldOfMoneyRequestwithout the additional per diem validation.Labels: Removing
DeployBlockerlabel (backend is not involved). KeepingDeployBlockerCash(App deploy blocked).Detailed Analysis
Evidence
The bug occurs when:
This is a regression introduced by PR #84512 which added "Move to report" functionality for single-expense reports.
Verification
In
src/components/ReportActionItem/MoneyRequestView.tsx(lines 371-383), the Report field check includes:The additional check
(!isPerDiemRequest || canSubmitPerDiemExpenseFromWorkspace(policy) || ...)ensures per diem expenses cannot be moved when rates are deleted.However, PR #84512 added the "Move to report" functionality in:
src/libs/ReportSecondaryActionUtils.ts(lines 964-976 in the PR diff)src/components/MoneyReportHeader.tsxsrc/components/MoneyRequestHeader.tsxThese locations only check
canEditFieldOfMoneyRequest()andcanUserPerformWriteAction(), but do NOT include the per diem rate validation that exists for the Report field.Root Cause
The function
canEditFieldOfMoneyRequest()inReportUtils.tshandles the REPORT field edit permission (lines 4936-4989), but it does not check whether per diem rates still exist in the policy. This check is implemented separately inMoneyRequestView.tsxviacanSubmitPerDiemExpenseFromWorkspace(policy).When PR #84512 added "Move to report", it reused
canEditFieldOfMoneyRequest()without adding the additional per diem rate check, causing the inconsistency where:Fix Requirements
The fix should add the per diem rate validation to the "Move to report" logic, matching the Report field behavior:
This check needs to be added in:
MoneyReportHeader.tsx-canMoveSingleExpensecalculationMoneyRequestHeader.tsx- Secondary action filteringReportSecondaryActionUtils.ts- BothgetSecondaryReportActionsandgetSecondaryTransactionThreadActionsMelvinBot commentedon Mar 12, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When per diem rates are deleted from a workspace, the Report field on an existing per diem expense is correctly disabled, but the "Move to report" option in the More menu remains visible. "Move to report" should be hidden because it has the same functionality as the Report field.
What is the root cause of that problem?
PR #84512 added the
MOVE_EXPENSEsecondary action to the "More" menu. The visibility check uses onlycanEditFieldOfMoneyRequest(reportAction, CONST.EDIT_REQUEST_FIELD.REPORT, ...), which does not check whether per diem rates are available on the policy.In contrast, the Report field in
MoneyRequestView.tsx(line 371-383) layers an additional per diem guard on top ofcanEditFieldOfMoneyRequest:canSubmitPerDiemExpenseFromWorkspace(PolicyUtils.ts:1224-1227) returnsfalsewhen per diem rates are removed becausegetPerDiemCustomUnit(policy)returns empty/undefined. This guard is what correctly disables the Report field — but this same guard is missing from the newMOVE_EXPENSEaction in three places:ReportSecondaryActionUtils.ts—getSecondaryTransactionThreadActions(controls the "More" menu on individual expense view)ReportSecondaryActionUtils.ts—getSecondaryReportActions(controls the "More" menu on one-expense report view)MoneyReportHeader.tsx—canMoveSingleExpense(additional visibility check for the report-level "More" menu)What changes do you think we should make in order to solve the problem?
Add the per diem rate availability check to the
MOVE_EXPENSEvisibility logic inReportSecondaryActionUtils.ts, in bothgetSecondaryTransactionThreadActionsandgetSecondaryReportActions. Specifically, before pushingMOVE_EXPENSE, add a check: if the transaction is a per diem request (viaisPerDiemRequestfromTransactionUtils), also require thatcanSubmitPerDiemExpenseFromWorkspace(policy)returnstrue(fromPolicyUtils). This mirrors the existing guard used by the Report field inMoneyRequestView.tsx.The same check should also be added to
canMoveSingleExpenseinMoneyReportHeader.tsxfor consistency.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.luacmartins commentedon Mar 12, 2026
Fixed by this revert #84984. Closing.
melvin-bot commentedon Mar 17, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.