Skip to content

Spend -"Custom Field" columns are not displayed after moving unreported expense to workspace #95011

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


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.

  1. Open the staging.new.expensify.com website.
  2. Create a manual expense and submit it to Self DM.
  3. Navigate to "Workspaces" > Workspace > "Members"
  4. Click on your profile and add any value to "Custom Field 1" and "Custom Field 2"
  5. Navigate to "Spend" > "Expenses"
  6. Click on "Display" > "Edit Columns"
  7. Add "Custom Field 1" and "Custom field 2" and save it.
  8. Select the expense created on step 2.
  9. Click on dropdown menu > "Move Expense" > "Create Report"
  10. Note that after expense is moved to report on workspace, "Custom Fields" columns are not displayed on preview.
  11. Open and close the expense.
  12. 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.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

To be added by Applause Leads

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7195822

Activity

  1. applause-bot commented on Jun 30, 2026

    @applause-bot
    Author

    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

  2. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 30, 2026
  3. melvin-bot commented on Jun 30, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #90937

  4. melvin-bot commented on Jun 30, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Jun 30, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. MelvinBot commented on Jun 30, 2026

    @MelvinBot
    Contributor

    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, 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":

    Two gates both require a loaded report to already carry the value, otherwise the user‑selected column is filtered out:

    Values are read straight off the report object — nothing in App writes them optimistically:

    The optimistic report builder seeds only basic fields and none of these three:

    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.

    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.

  7. cristipaval commented on Jul 1, 2026

    @cristipaval
    Contributor

    demoting, sounds like a rare edge case that can take the regular path

  8. KJ21-ENG commented on Jul 1, 2026

    @KJ21-ENG
    Contributor

    No able to repro either, good if we can we have some recording for better understanding ?

  9. grgia commented on Jul 3, 2026

    @grgia
    Contributor

    can we close if not repro?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringHourlyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions