Skip to content

[Due for payment 2026-11-10] [$175] Custom field 1 and Custom field 2 do not update after editing custom field and opening Spend #94960

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): nsjoijojosdjosjosj@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Create a Control workspace.
  • Add value to Custom field 1 and Custom field 2 in your profile via workspace settings > Members.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create two expenses.
  4. Go to Spend > Expenses.
  5. Click Display > Edit columns.
  6. Select Custom field 1 and Custom field 2 > Save.
  7. Go to workspace settings > Members.
  8. Click on your profile.
  9. Edit Custom field 1 and Custom field 2.
  10. Go to Spend tab.

Expected Result:

Custom field 1 and Custom field 2 will update after opening Spend.

Actual Result:

Custom field 1 and Custom field 2 do not update after opening Spend.
It only updates after opening Inbox and returning to Spend or opening the expense.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7195342_1782821667523.2.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7195342

Issue OwnerCurrent Issue Owner: @shubham1206agra

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/d066ff5b50bc214f507553facc2c58c48e8bada6de0f431e322d7d31ca4ca739

  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

    Root Cause: The Spend > Expenses table renders Custom field 1/2 from report.submitterUserID / report.submitterPayrollID, which are only ever populated by the backend Search response into the snapshot_<hash> Onyx data. Editing a member's custom field writes to a completely different Onyx location — policy_<id>.employeeList[login].employeeUserID / employeePayrollID — and nothing on the client recomputes the report fields from it. So the columns stay stale until the Search API re-runs (which happens on screen re-focus), which is exactly why navigating to Inbox and back, or opening the expense, fixes it.

    PR #90937 introduced this by intentionally rendering only from the report fields with no policy.employeeList fallback (stated in the PR description), so optimistic member edits never reach the table.

    What is the root cause of that problem?

    Two disjoint data sources:

    These report fields have no client-side writer — a grep of src/ shows submitterUserID/submitterPayrollID are only read, never written by any optimistic update. They refresh only when search() re-runs, which is triggered on Search screen re-focus in Search/index.tsx:360-396.

    What changes do you think we should make in order to solve the problem?

    In the row components that render the columns, derive Custom field 1/2 from the live policy member data and fall back to the report field, so optimistic edits to policy.employeeList are reflected immediately:

    1. Resolve the report submitter's login (from ownerAccountID via personal details).
    2. Read policy.employeeList[submitterLogin].employeeUserID / employeePayrollID (via CONST.CUSTOM_FIELD_KEYS) reactively (the policy collection is already in Onyx).
    3. Use that value, falling back to report.submitterUserID / submitterPayrollID when the member data isn't available.

    This re-adds the policy.employeeList fallback that PR #90937 deliberately omitted, which is the source of the staleness. Apply it in both TransactionItemRowWide.tsx and ExpenseReportListItemRowWide.tsx (and the equivalent logic in ReportUtils.getReportCustomColumnValue if shared).

    What alternative solutions did you explore? (Optional)

    • Have updateMemberCustomField also optimistically update the report/snapshot fields for the member's reports. More complex — it must find every report submitted by that member and merge submitterUserID/submitterPayrollID into both live reports and active snapshots; the display-layer fallback is simpler and inherently reactive.
    • Backend fix: confirm whether UpdatePolicyMembersCustomFields returns onyx updates for the affected reports/snapshots. If the intended design is for the column to mirror live member data, the client fallback is still the cleaner path.
    • Revert PR feat: add three report custom columns to expense tables #90937 to clear the deploy blocker if a fix can't land quickly.
    Investigation details & evidence

    Confidence: High — two independent investigations agreed; fully explained by static analysis of disjoint Onyx data sources.

    Data flow:

    1. User edits Custom field 1/2 → updateMemberCustomField optimistically merges into policy_<id>.employeeList[login].employeeUserID/employeePayrollID only.
    2. Table renders report.submitterUserID/submitterPayrollID from the Search snapshot (SearchUIUtils.getReportSections ~:2805, getTransactionsSections ~:2081).
    3. The two Onyx keys are unrelated and nothing recomputes the report fields from policy data → columns stay stale.
    4. Re-focusing the Search screen re-runs search() → Search API rewrites the snapshot with fresh values → table updates. (Same effect from opening the expense / re-fetching the report.)

    Field definitions are display-only: Report.ts:101-108 document submitterUserID = "Custom field 1 value for the report submitter" and submitterPayrollID = "Custom field 2 value".

    This is entirely within the App repo (the display layer reads the wrong/stale source), so a client-side fix is viable without backend changes.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/94960) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  7. grgia commented on Jun 30, 2026

    @grgia
    Contributor

    Discussing in slack, may be a BE bug. @shubham1206agra @KJ21-ENG

    Would you please write the command / incorrect reponse you're encountering

  8. 48 remaining items

  9. melvin-bot commented on Nov 12, 2026

    @melvin-bot

    @mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

  10. mallenexpensify commented on Nov 13, 2026

    @mallenexpensify
    Contributor

    Claude posting on behalf of Matt:

    Hold/$0. Job price: $250 for shubham1206agra, assigned 2026-06-30, before 2026-09-19. The title says $175.

    • shubham1206agra (C+ on the PR, Backend Contributor on the roster): 0%

    shubham1206agra approved #90937, the cause. This issue was created 2026-06-30, before #90937 reached production on 2026-07-01. That is inside the regression window.

    Next: close.

    Evidence
    • Resolving PR: #103441 by grgia, merged 2026-11-02, approved by luacmartins, shubham1206agra. No revert.
    • Offending PR (BrowserStack field): #90937 by KJ21-ENG, approved by flaviadefaria, grgia, shubham1206agra. Merged 2026-06-29, production 2026-07-01, window ended 2026-07-08.

    PAYPREP v1

  11. mallenexpensify commented on Nov 13, 2026

    @mallenexpensify
    Contributor

    @shubham1206agra plz complete the Contributor+ checklist and tag me in a post once you have.
    I'm planning to not pay on this issue, comment if you disagree

  12. shubham1206agra commented on Nov 14, 2026

    @shubham1206agra
    Contributor

    Contributor+ 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: NA as this is a BE issue which came up after feat: add three report custom columns to expense tables #90937 has been deployed.
      Link to the comment on the Issue: NA

    • [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: NA

    • [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.

    Regression Test Proposal

    Precondition:

    • Use a wide layout (web or desktop).
    • Have a Control workspace where you are an admin.
    • In the workspace chat, create two expenses.
    • In Workspaces > your workspace > Members > your profile, add a value to Custom field 1 and Custom field 2.

    Test:

    1. Go to Spend > Expenses.
    2. Click Display > Edit columns.
    3. Select Custom field 1 and Custom field 2, then click Save.
    4. Note the values in the Custom field 1 and Custom field 2 columns for your expenses.
    5. Go to Workspaces > your workspace > Members.
    6. Click your profile.
    7. Click Custom field 1, enter a new value, and click Save.
    8. Click Custom field 2, enter a new value, and click Save.
    9. Go to the Spend tab.
    10. Verify that the Custom field 1 and Custom field 2 columns show the new values without opening Inbox or the expense first.

    Do we agree 👍 or 👎

  13. shubham1206agra commented on Nov 14, 2026

    @shubham1206agra
    Contributor

    I'm planning to not pay on this issue, comment if you disagree

    @mallenexpensify This is not exactly a regression as this is a design change which required discussion and BE/FE PRs to work.

  14. mallenexpensify commented on Nov 15, 2026

    @mallenexpensify
    Contributor

    This is not exactly a regression as this is a design change which required discussion and BE/FE PRs to work.

    @shubham1206agra, @MelvinBot is there a link to confirm this?

  15. MelvinBot commented on Nov 15, 2026

    @MelvinBot
    Contributor

    There are links confirming discussion and BE/FE work, but not conclusively the “not a regression” claim:

    So the original feature required BE/FE coordination, but these references don’t establish that this stale-value bug was an agreed design change rather than a regression.


    view run

  16. shubham1206agra commented on Nov 15, 2026

    @shubham1206agra
    Contributor

    @grgia Can you please chime in here?

  17. grgia commented on Nov 16, 2026

    @grgia
    Contributor

    The fix ended up FE only (#103441). Spend wasn't refetching its results after a member's custom field changed, no BE or design change shipped. It was a gap in #90937 caught on staging. @mallenexpensify payment call is yours.

  18. mallenexpensify commented on Nov 16, 2026

    @mallenexpensify
    Contributor

    Thanks @grgia. That confirms the bug came from #90937: the fix was FE only, with no BE or design change. @shubham1206agra approved #90937, and work to fix a regression caused by the PR is unpaid. No payment on this issue. Closing.

    @shubham1206agra comment/reopen if you disagree

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions