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
Spend -"Custom Field" columns are not displayed after moving unreported expense to workspace #95011
Version Number: 9.4.25-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:#90937 Email or phone of affected tester (no customers):ibellicotest+2766@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Windows 11 / Chrome App Component: Search
Action Performed:
Prerequisite: User is owner of a "Control" workspace.
Prerequisite 2: No expenses created yet.
Prerequisite 3: Account has Self DM.
Open the staging.new.expensify.com website.
Create a manual expense and submit it to Self DM.
Navigate to "Workspaces" > Workspace > "Members"
Click on your profile and add any value to "Custom Field 1" and "Custom Field 2"
Navigate to "Spend" > "Expenses"
Click on "Display" > "Edit Columns"
Add "Custom Field 1" and "Custom field 2" and save it.
Select the expense created on step 2.
Click on dropdown menu > "Move Expense" > "Create Report"
Note that after expense is moved to report on workspace, "Custom Fields" columns are not displayed on preview.
Open and close the expense.
Note that "Custom Fields" columns are now visible.
Expected Result:
"Custom Field" columns should be automatically visible on preview of expense that was moved to report on workspace.
Actual Result:
"Custom Field" columns are not automatically displayed on preview of unreported expense that was moved to report on workspace.
Columns only appear after opening and closing report.
👋 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.
The three custom columns added in #90937 (Custom Field 1 → report.submitterUserID, Custom Field 2 → report.submitterPayrollID, International reimbursement IDs → report.orderDealNumbers) are data‑gated: even when the user explicitly selects them in Edit Columns, getColumnsToShow() drops them unless a currently‑loaded report already holds a non‑empty value for that field.
When you "Move Expense → Create Report", the destination report is created optimistically and that optimistic report has none of these three fields — they are backend‑populated (derived from the workspace member's custom fields). So the gate immediately filters the columns out. When you open the report, OpenReport returns the fully‑populated report, Onyx updates, getColumnsToShow() re‑runs, the values are now present, and the columns reappear — which is exactly the "open and close to fix" behavior reported.
Code evidence (verified, confidence: high)
The three columns are registered as gated "report custom columns":
The column visibility recomputes on every Onyx change (this is not a stale‑memoization bug) — the gate simply evaluates to "hidden" while the optimistic report lacks the data.
What changes do you think we should make in order to solve the problem?
When one of these three columns has been explicitly selected by the user, keep it visible regardless of whether any loaded report currently has a value — the cell just renders empty until the backend fields arrive. Concretely, skip the hasReportCustomColumnValue data‑gate (in both the 5673-5686 report path and the 5912-5919 transaction path) for any column the user added via Edit Columns, the same way other user‑selected columns (e.g. nonDataColumns) are always kept. This matches the expected behavior and also fixes the offline variant.
A new unit case should be added to tests/unit/Search/ColumnAvailabilityTest.ts, which currently has no coverage for these report custom columns.
What alternative solutions did you explore? (Optional)
Copying the three fields onto the optimistic destination report from a source report — rejected, because the reported repro moves an unreported Self DM expense, so there is no source report to copy from and the values are derived server‑side.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/95011) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
Activity
applause-bot commentedon Jun 30, 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/b4f4b924b0eea26839b24f9e8aef19b830c4a60ce10da0d340b84c1c4bf15862
melvin-bot commentedon Jun 30, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #90937
melvin-bot commentedon Jun 30, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 30, 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 30, 2026
Proposal
What is the root cause of that problem?
The three custom columns added in #90937 (Custom Field 1 →
report.submitterUserID, Custom Field 2 →report.submitterPayrollID, International reimbursement IDs →report.orderDealNumbers) are data‑gated: even when the user explicitly selects them in Edit Columns,getColumnsToShow()drops them unless a currently‑loaded report already holds a non‑empty value for that field.When you "Move Expense → Create Report", the destination report is created optimistically and that optimistic report has none of these three fields — they are backend‑populated (derived from the workspace member's custom fields). So the gate immediately filters the columns out. When you open the report,
OpenReportreturns the fully‑populated report, Onyx updates,getColumnsToShow()re‑runs, the values are now present, and the columns reappear — which is exactly the "open and close to fix" behavior reported.Code evidence (verified, confidence: high)
The three columns are registered as gated "report custom columns":
SearchUIUtils.ts:5626-5632Two gates both require a loaded report to already carry the value, otherwise the user‑selected column is filtered out:
SearchUIUtils.ts:5673-5686SearchUIUtils.ts:5912-5919→ final filter atSearchUIUtils.ts:6065(these three are not in the always‑keepnonDataColumnsset at6043)Values are read straight off the report object — nothing in App writes them optimistically:
ReportUtils.ts:13127-13138The optimistic report builder seeds only basic fields and none of these three:
ReportUtils.ts:6775-6823The column visibility recomputes on every Onyx change (this is not a stale‑memoization bug) — the gate simply evaluates to "hidden" while the optimistic report lacks the data.
What changes do you think we should make in order to solve the problem?
When one of these three columns has been explicitly selected by the user, keep it visible regardless of whether any loaded report currently has a value — the cell just renders empty until the backend fields arrive. Concretely, skip the
hasReportCustomColumnValuedata‑gate (in both the5673-5686report path and the5912-5919transaction path) for any column the user added via Edit Columns, the same way other user‑selected columns (e.g.nonDataColumns) are always kept. This matches the expected behavior and also fixes the offline variant.A new unit case should be added to
tests/unit/Search/ColumnAvailabilityTest.ts, which currently has no coverage for these report custom columns.What alternative solutions did you explore? (Optional)
Copying the three fields onto the optimistic destination report from a source report — rejected, because the reported repro moves an unreported Self DM expense, so there is no source report to copy from and the values are derived server‑side.
Related issues
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/95011)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
cristipaval commentedon Jul 1, 2026
demoting, sounds like a rare edge case that can take the regular path
KJ21-ENG commentedon Jul 1, 2026
No able to repro either, good if we can we have some recording for better understanding ?
grgia commentedon Jul 3, 2026
can we close if not repro?