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-06-19] Invoice - Invoice fields are not enabled after duplicating workspace with invoice fields #93241
Version Number: 9.4.5-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:#73887 Email or phone of affected tester (no customers):applausetester+ssndjois2jd1@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Workspace Settings
Action Performed:
Precondition:
Enable Invoices in workspace settings.
Add a bank account in workspace settings > Invoices.
Enable Invoice fields and create any field.
Go to staging.new.expensify.com
Go to Workspaces tab.
Click 3-dot menu next to the workspace with invoices enabled.
Click Duplicate workspace.
Click Next > Continue.
Open the duplicated workspace.
Go to Invoices.
Expected Result:
Invoice fields will be enabled after duplicating workspace with invoice fields.
Actual Result:
Invoice fields are not enabled after duplicating workspace with invoice fields.
👋 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.
Root Cause: Workspace duplication doesn't carry over the new invoice fields feature (PR #73887, same deploy). The duplicate flow never tells the backend to copy areInvoiceFieldsEnabled or the invoice‑target fields, so the duplicated workspace comes back with invoice fields disabled.
Two gaps work together:
No invoice‑fields flag is sent to the backend. The parts payload built for the DuplicatePolicy command lists every feature (reports, invoices, taxes, …) but has no key for invoice fields — WorkspaceDuplicateSelectFeaturesForm.tsx:234-250, serialized and sent at Policy.ts:3626-3642. The backend DuplicatePolicy command predates invoice fields and has no instruction to copy them.
The optimistic builder doesn't handle invoice fields either.buildOptimisticDuplicatePolicy explicitly sets areInvoicesEnabled but never sets areInvoiceFieldsEnabled (it only survives via the ...sourcePolicy spread), and it gates the whole fieldList on the reports feature: fieldList: isReportsFeatureSelected ? … : undefined (Policy.ts:3331). Invoice fields are stored in that same fieldList (distinguished by target === INVOICE, see WorkspaceInvoiceFieldsSection.tsx:19-22), so they're not tied to the invoices feature at all.
Because the bug reproduces in staging (i.e. after the server response), the authoritative backend policy is what's missing the feature — the DuplicatePolicy command isn't copying areInvoiceFieldsEnabled or the invoice‑target entries of fieldList.
⚠️ This fix requires a backend change outside the App repo. The DuplicatePolicy command (Auth / Web‑Expensify) must copy the areInvoiceFieldsEnabled flag and the invoice‑target report fields when duplicating. That should be driven off the invoices part (or a new invoiceFields part) — not the reports part. An internal engineer with access to that repo needs to implement it. The App side should be updated in tandem to (a) send an invoice‑fields signal in parts, (b) explicitly set areInvoiceFieldsEnabled in buildOptimisticDuplicatePolicy, and (c) stop gating invoice‑target fieldList entries on the reports feature.
Investigation details & evidence
Invoice fields feature toggle is policy.areInvoiceFieldsEnabled (Policy.ts type:2331-2332); the actual fields live in policy.fieldList filtered by target === CONST.REPORT_FIELD_TARGETS.INVOICE.
The duplicate dialog selects all features by default (WorkspaceDuplicateSelectFeaturesForm.tsx:359), so even the optimistic copy of fieldList happens — yet the staging result still shows invoice fields disabled, confirming the server response overrides the optimistic data.
Success data for the duplicated policy only clears pendingFields (incl. areReportFieldsEnabled but notareInvoiceFieldsEnabled) — Policy.ts:3500-3515. It relies on the backend to return the authoritative policy, which doesn't include the invoice‑fields feature.
Alternative considered: a purely-frontend optimistic bug. Ruled out because the issue reproduces in staging against the real API — the optimistic builder (with all features selected) would otherwise show invoice fields enabled.
Next Steps for Contributor+ team: Backend fix required — the root cause is in the DuplicatePolicy command outside the App repo; please escalate to an internal engineer to copy the invoice‑fields feature on duplication. To refine:@MelvinBot <your feedback>
changed the title [-]Invoice - Invoice fields are not enabled after duplicating workspace with invoice fields[/-][+][Due for payment 2026-06-19] Invoice - Invoice fields are not enabled after duplicating workspace with invoice fields[/+]on Jun 12, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.6-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@mollfpr 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]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
applause-bot commentedon Jun 11, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/6a03170f4dcd407640b6992ca150f0bfb4eb2926a3d143a3e134a7e4327d8c21
melvin-bot commentedon Jun 11, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #73887
melvin-bot commentedon Jun 11, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 11, 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:
MelvinBot commentedon Jun 11, 2026
Issue Analysis
Root Cause: Workspace duplication doesn't carry over the new invoice fields feature (PR #73887, same deploy). The duplicate flow never tells the backend to copy
areInvoiceFieldsEnabledor the invoice‑target fields, so the duplicated workspace comes back with invoice fields disabled.Two gaps work together:
No invoice‑fields flag is sent to the backend. The
partspayload built for theDuplicatePolicycommand lists every feature (reports,invoices,taxes, …) but has no key for invoice fields —WorkspaceDuplicateSelectFeaturesForm.tsx:234-250, serialized and sent atPolicy.ts:3626-3642. The backendDuplicatePolicycommand predates invoice fields and has no instruction to copy them.The optimistic builder doesn't handle invoice fields either.
buildOptimisticDuplicatePolicyexplicitly setsareInvoicesEnabledbut never setsareInvoiceFieldsEnabled(it only survives via the...sourcePolicyspread), and it gates the wholefieldListon the reports feature:fieldList: isReportsFeatureSelected ? … : undefined(Policy.ts:3331). Invoice fields are stored in that samefieldList(distinguished bytarget === INVOICE, seeWorkspaceInvoiceFieldsSection.tsx:19-22), so they're not tied to the invoices feature at all.Because the bug reproduces in staging (i.e. after the server response), the authoritative backend policy is what's missing the feature — the
DuplicatePolicycommand isn't copyingareInvoiceFieldsEnabledor the invoice‑target entries offieldList.DuplicatePolicycommand (Auth / Web‑Expensify) must copy theareInvoiceFieldsEnabledflag and the invoice‑target report fields when duplicating. That should be driven off theinvoicespart (or a newinvoiceFieldspart) — not thereportspart. An internal engineer with access to that repo needs to implement it. The App side should be updated in tandem to (a) send an invoice‑fields signal inparts, (b) explicitly setareInvoiceFieldsEnabledinbuildOptimisticDuplicatePolicy, and (c) stop gating invoice‑targetfieldListentries on the reports feature.Investigation details & evidence
policy.areInvoiceFieldsEnabled(Policy.tstype:2331-2332); the actual fields live inpolicy.fieldListfiltered bytarget === CONST.REPORT_FIELD_TARGETS.INVOICE.WorkspaceDuplicateSelectFeaturesForm.tsx:359), so even the optimistic copy offieldListhappens — yet the staging result still shows invoice fields disabled, confirming the server response overrides the optimistic data.pendingFields(incl.areReportFieldsEnabledbut notareInvoiceFieldsEnabled) —Policy.ts:3500-3515. It relies on the backend to return the authoritative policy, which doesn't include the invoice‑fields feature.Next Steps for Contributor+ team:
Backend fix required — the root cause is in the
DuplicatePolicycommand outside the App repo; please escalate to an internal engineer to copy the invoice‑fields feature on duplication.To refine:
@MelvinBot <your feedback>melvin-bot commentedon Jun 11, 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.
melvin-bot commentedon Jun 11, 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.
mollfpr commentedon Jun 11, 2026
Closing — the invoice fields feature has been reverted, so this no longer reproduces on staging.
[-]Invoice - Invoice fields are not enabled after duplicating workspace with invoice fields[/-][+][Due for payment 2026-06-19] Invoice - Invoice fields are not enabled after duplicating workspace with invoice fields[/+]melvin-bot commentedon Jun 12, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.6-4 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-06-19. 🎊
melvin-bot commentedon Jun 12, 2026
@mollfpr 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]. If no checklist is needed for this issue, you can click: [no checklist button]
Address invoice field regressions