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-05-28] [$250] Expense - Duplicate expense created in the Expired Workspace #84368
Version Number: v9.3.32-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#83736 Email or phone of affected tester (no customers):luongquocvu92+010125@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Windows 10/Chrome App Component: Money Requests
Action Performed:
Preconditions: User has an Expired Workspace and is a member of another Workspace
Open the Workspace user as a member
Click on an expense has created
Click on the More button
Select Duplicate expense
Go to the Expired Workspace chat
Expected Result:
The duplicate expense should not be created in the Expired Workspace
Actual Result:
The duplicate expense displays in the Expired Workspace
The duplicate expense flow never checks whether the target workspace has expired billing. When a user clicks "Duplicate expense," useDefaultExpensePolicy selects the target workspace using isPolicyAccessible, which only verifies the policy exists, isn't pending deletion, and the user has a role — it does not check billing/expiration status.
What changes do you think we should make in order to solve the problem?
Add the same shouldRestrictUserBillableActions guard that exists in the Add Expense handler to the Duplicate Expense handler. Specifically, in MoneyReportHeader.tsx, inside the DUPLICATE_EXPENSEonSelected callback (around line 1483), add a check before proceeding with the duplication:
If the target policy (from defaultExpensePolicy) has restricted billable actions, navigate to ROUTES.RESTRICTED_ACTION and return early — exactly as the Add Expense handler does at line 1778.
useDefaultExpensePolicy() selects target workspace via isPolicyAccessible() (PolicyUtils.ts:1787-1795) — only checks non-empty, has ID, not pending-delete, user has role
duplicateExpenseTransaction() (Duplicate.ts:665) creates expense in the target policy with no billing validation
Contrast with Add Expense (which works correctly):
MoneyReportHeader.tsx:1778 calls shouldRestrictUserBillableActions(policy.id, ...) and navigates to the restricted action route if the workspace is expired
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.
changed the title [-]Expense - Duplicate expense created in the Expired Workspace[/-][+][$250] Expense - Duplicate expense created in the Expired Workspace[/+]on Apr 13, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.78-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@eVoloshchak The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: N/A, this was simply never implemented
Link to the comment on the Issue:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: regression wasn't critical
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
MelvinBot commentedon Apr 13, 2026
Proposal
What is the root cause of that problem?
The duplicate expense flow never checks whether the target workspace has expired billing. When a user clicks "Duplicate expense,"
useDefaultExpensePolicyselects the target workspace usingisPolicyAccessible, which only verifies the policy exists, isn't pending deletion, and the user has a role — it does not check billing/expiration status.The function
shouldRestrictUserBillableActionsexists for exactly this purpose and is already used in the Add Expense handler (MoneyReportHeader.tsx:1778), but it is missing from the Duplicate Expense handler (MoneyReportHeader.tsx:1483-1521).What changes do you think we should make in order to solve the problem?
Add the same
shouldRestrictUserBillableActionsguard that exists in the Add Expense handler to the Duplicate Expense handler. Specifically, inMoneyReportHeader.tsx, inside theDUPLICATE_EXPENSEonSelectedcallback (around line 1483), add a check before proceeding with the duplication:If the target policy (from
defaultExpensePolicy) has restricted billable actions, navigate toROUTES.RESTRICTED_ACTIONand return early — exactly as the Add Expense handler does at line 1778.The same fix should also be applied to the transaction-level duplicate action in
MoneyRequestHeaderSecondaryActions.tsxwhich has the same gap.Investigation details
Data flow (no expiration check at any step):
MoneyReportHeader.tsx:1478isDuplicateAction()gate (ReportSecondaryActionUtils.ts:813-839) checks transaction count, scanning status, submitter — no expiration checkuseDefaultExpensePolicy()selects target workspace viaisPolicyAccessible()(PolicyUtils.ts:1787-1795) — only checks non-empty, has ID, not pending-delete, user has roleduplicateExpenseTransaction()(Duplicate.ts:665) creates expense in the target policy with no billing validationContrast with Add Expense (which works correctly):
MoneyReportHeader.tsx:1778callsshouldRestrictUserBillableActions(policy.id, ...)and navigates to the restricted action route if the workspace is expiredBoth entry points affected:
MoneyReportHeader.tsx:1478-1521MoneyRequestHeaderSecondaryActions.tsx:204-238Next 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.melvin-bot commentedon Apr 13, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (
External)[-]Expense - Duplicate expense created in the Expired Workspace[/-][+][$250] Expense - Duplicate expense created in the Expired Workspace[/+]37 remaining items
melvin-bot commentedon May 21, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 21, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.78-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-05-28. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 21, 2026
@eVoloshchak The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
melvin-bot commentedon May 26, 2026
@eVoloshchak Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon May 27, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)eVoloshchak commentedon May 27, 2026
BugZero Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: N/A, this was simply never implemented
Link to the comment on the Issue:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: regression wasn't critical
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/642761
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-aea2-a993-ac52-d2cb375ad234melvin-bot commentedon May 28, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon May 29, 2026
Payment Summary
Contributor+: @eVoloshchak due $250 via NewDot
^ Test case created. Thx
JmillsExpensify commentedon Aug 3, 2026
$250 approved for @eVoloshchak