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 - Error submitting expense as approver when member creates report and adds expense #79615
Version Number: 9.3.2-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:#78984 Email or phone of affected tester (no customers):sdsnjsoisjnionjisdjos22@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.1 / Chrome App Component: Search
Action Performed:
Precondition:
Create a workspace with admin, non-admin approver and member.
Member:
Go to staging.new.expensify.com
Go to workspace chat.
Create an empty report.
On the empty report, click Add expense > Create expense.
Create an expense.
Non-admin approver:
6. Open the expense report.
7. Click More > Submit.
Expected Result:
Non-admin approver should be able to submit the report without issue.
Actual Result:
Error submitting expense as non-admin approver when member creates report and adds expense.
👋 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: #78984 - "fix: Submit button is not displayed in second report to Approver" by @nkdengineer (High confidence) Related Issues: #77882 (original issue that PR #78984 was fixing)
Recommendation: REVERT
PR #78984 should be reverted because it incorrectly allows non-admin approvers to see and attempt to submit expense reports. Approvers should approve reports, not submit them. Reports should only be submitted by the report owner (the member who created the expense).
Labels: Both DeployBlockerCash and DeployBlocker should be kept, as this is a frontend bug that blocks the App deploy.
Detailed Analysis
Evidence
PR #78984 modified the logic in ReportPreviewActionUtils.ts and ReportSecondaryActionUtils.ts to change how the isManager check works when determining who can submit a report.
These changes directly affect the canSubmit and isSubmitAction functions, which control when the Submit button/action is displayed.
Root Cause
The original issue (#77882) reported that the submit button was not showing for approvers on second reports. However, the fix in PR #78984 appears to have misunderstood the requirement:
Approvers should be able to APPROVE reports (not submit them)
Report owners/submitters should be able to SUBMIT reports
By broadening the isManager check to include users where getSubmitToAccountID(policy, report) === currentUserAccountID, the PR now allows non-admin approvers to see the Submit option when they should only see the Approve option.
When a non-admin approver tries to submit a report they did not create, the submission fails because:
The backend expects the report owner to submit the report
The frontend is now incorrectly allowing approvers to attempt submission
This creates a mismatch between frontend permissions and backend validation
The error occurs in this scenario:
Precondition: Workspace with admin, non-admin approver, and member
Member creates a report and adds an expense
Non-admin approver opens the report, clicks More > Submit
Result: Error - the approver should not be able to submit, only approve
Recommended Fix Approach
After reverting PR #78984, the correct fix for the original issue (#77882) should:
Ensure approvers see the APPROVE button, not the SUBMIT button
Ensure the report owner/submitter sees the SUBMIT button
Review the distinction between canSubmit and canApprove functions to ensure they are checking the correct permissions
After reviewing the test steps in PR #78984, I can confirm that approvers are intentionally allowed to submit reports on behalf of members in Expensify workflows. However, PR #78984 appears to have enabled this functionality in a scenario where it creates an error.
The root issue: PR #78984 broadened the condition for showing the submit button to include approvers (via the getSubmitToAccountID check), but this may have exposed a scenario where:
The frontend now allows non-admin approvers to see and click Submit
The backend validation or the submission flow fails for non-admin approvers in specific scenarios (like when the member creates an empty report and adds expenses)
This is still classified as a Frontend bug because the fix needs to happen in the App repository - either by:
Adding additional frontend validation to prevent the Submit option from showing in problematic scenarios
Or fixing the submission logic to properly handle non-admin approver submissions
Recommendation remains: REVERT PR #78984 to unblock the deploy, then investigate and implement a proper fix that handles all approval workflow scenarios correctly.
Activity
melvin-bot commentedon Jan 14, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #78984
melvin-bot commentedon Jan 14, 2026
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Jan 14, 2026
Triggered auto assignment to @JmillsExpensify (
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.github-actions commentedon Jan 14, 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 Jan 14, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #78984 - "fix: Submit button is not displayed in second report to Approver" by @nkdengineer (High confidence)
Related Issues: #77882 (original issue that PR #78984 was fixing)
Recommendation: REVERT
PR #78984 should be reverted because it incorrectly allows non-admin approvers to see and attempt to submit expense reports. Approvers should approve reports, not submit them. Reports should only be submitted by the report owner (the member who created the expense).
Labels: Both
DeployBlockerCashandDeployBlockershould be kept, as this is a frontend bug that blocks the App deploy.Detailed Analysis
Evidence
PR #78984 modified the logic in
ReportPreviewActionUtils.tsandReportSecondaryActionUtils.tsto change how theisManagercheck works when determining who can submit a report.Before PR #78984:
After PR #78984:
Verification
The PR modified these two files:
src/libs/ReportPreviewActionUtils.ts(lines 40-41)src/libs/ReportSecondaryActionUtils.ts(line 219)These changes directly affect the
canSubmitandisSubmitActionfunctions, which control when the Submit button/action is displayed.Root Cause
The original issue (#77882) reported that the submit button was not showing for approvers on second reports. However, the fix in PR #78984 appears to have misunderstood the requirement:
By broadening the
isManagercheck to include users wheregetSubmitToAccountID(policy, report) === currentUserAccountID, the PR now allows non-admin approvers to see the Submit option when they should only see the Approve option.When a non-admin approver tries to submit a report they did not create, the submission fails because:
The error occurs in this scenario:
Recommended Fix Approach
After reverting PR #78984, the correct fix for the original issue (#77882) should:
canSubmitandcanApprovefunctions to ensure they are checking the correct permissionsOSBotify commentedon Jan 14, 2026
Update to my previous analysis:
After reviewing the test steps in PR #78984, I can confirm that approvers are intentionally allowed to submit reports on behalf of members in Expensify workflows. However, PR #78984 appears to have enabled this functionality in a scenario where it creates an error.
The root issue: PR #78984 broadened the condition for showing the submit button to include approvers (via the
getSubmitToAccountIDcheck), but this may have exposed a scenario where:This is still classified as a Frontend bug because the fix needs to happen in the App repository - either by:
Recommendation remains: REVERT PR #78984 to unblock the deploy, then investigate and implement a proper fix that handles all approval workflow scenarios correctly.
OSBotify commentedon Jan 14, 2026
Label Update
Removed
DeployBlockerlabel because this is a Frontend bug that requires fixing in the App repository (not the backend).Keeping
DeployBlockerCashbecause the App deploy should remain blocked until PR #78984 is reverted or a proper fix is implemented.Next Steps:
situchan commentedon Jan 14, 2026
@nkdengineer looks like QA team also reproduced #78984 (comment) what I faced before. Can you check?
mountiny commentedon Jan 15, 2026
Reverted the offending PR
IuliiaHerets commentedon Jan 15, 2026
@mountiny issue not already reproduced on 9.3.2-2 build
Screen.Recording.2026-01-15.at.21.27.45.mp4