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 - Approve button is not hidden or disabled when "Prevent self-approvals" is enabled #77367
Version Number: 9.2.75-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:#76887 Email or phone of affected tester (no customers):sjdoinjsdoisjdois@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Critical User Impact Device used: Mac 26.1 / Chrome App Component: Money Requests
Action Performed:
Precondition:
User has invited a member to the workspace.
Go to staging.new.expensify.com
Go to workspace chat.
Create an expense.
Open the expense report.
Click Submit.
Click More > Change approver.
Click Add approver > Select the invited member > Save.
Click More > Bypass approver > Change approver.
Go to workspace settings > Workflows.
Enable Prevent self-approvals.
Go back to the expense report.
Click Approve.
Expected Result:
Approve button should be hidden or disabled because "Prevent self-approvals" is enabled.
Actual Result:
Approve button is not hidden after bypassing approver and enabling "Prevent self-approvals", which leads to error when clicked.
👋 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.
If the user is the manager (managerID === currentUserAccountID)✅
If it's an expense report✅
If approval is enabled✅
If the report is processing✅
It did not check preventSelfApproval❌
This makes it also inconsistent with other approving functions like ReportSecondaryActionUtils.isApproveAction() and ReportPreviewActionUtils.canApprove()
What changes do you think we should make in order to solve the problem?
We should add a check if self approval is enabled . We can do something like this here
Activity
melvin-bot commentedon Dec 11, 2025
Triggered auto assignment to @twisterdotcom (
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 Dec 11, 2025
👋 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:
melvin-bot commentedon Dec 11, 2025
Triggered auto assignment to @aldo-expensify (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Dec 11, 2025
💬 A slack conversation has been started in #expensify-open-source
Nodebrute commentedon Dec 11, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Approve button is not hidden or disabled when "Prevent self-approvals" is enabled
What is the root cause of that problem?
This is happening because in
isApproveAction()function which controls the primary Approve button was missing thepreventSelfApprovalcheck.App/src/libs/ReportPrimaryActionUtils.ts
Lines 108 to 133 in e18b8bb
isApproveAction()button only checks for ✅This makes it also inconsistent with other approving functions like
ReportSecondaryActionUtils.isApproveAction()andReportPreviewActionUtils.canApprove()What changes do you think we should make in order to solve the problem?
We should add a check if self approval is enabled . We can do something like this here
App/src/libs/ReportPrimaryActionUtils.ts
Line 131 in e18b8bb
This is the same approach we use here and here
What alternative solutions did you explore? (Optional)
m-natarajan commentedon Dec 11, 2025
Not Repro, Windows 10/ Chrome, v9.2.75-3. Build not ready for native devices.
Repro.-.issue.77367.-.Not.Repro.mp4
yuwenmemon commentedon Dec 11, 2025
Thanks!