Skip to content

Reports - Missing Group columns in Week filter #80818

Closed

Description

@mitarachim

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.3.11-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: #80684
Email or phone of affected tester (no customers): applausetester+khcategory20@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.1 / Chrome
App Component: Search

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to Reports > Expenses.
  3. Click Filters > Group by.
  4. Select Week > click Save.
  5. Click Columns.

Expected Result:

Group columns will be displayed.

Actual Result:

Group columns are missing.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

View all open jobs on GitHub

Bug7060717_1769643051046.3.mp4

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Jan 28, 2026
  2. melvin-bot commented on Jan 28, 2026

    @melvin-bot

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

  3. melvin-bot commented on Jan 28, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jan 28, 2026

    @melvin-bot

    Triggered auto assignment to @trjExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  5. github-actions commented on Jan 28, 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. OSBotify commented on Jan 28, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #80684 - "Add support for groupBy week in Search" by @cristipaval (High confidence)
    Related Issues: None

    Recommendation: ROLL FORWARD

    A quick fix is needed to add the missing WEEK cases in three places. Reverting would remove the entire Week grouping feature that was intentionally added. The fix is straightforward and isolated.

    Labels: Keeping DeployBlockerCash (App PR caused the issue), removing DeployBlocker (not a backend bug)

    📋 Detailed Analysis

    Evidence

    PR #80684 added comprehensive support for "Group by Week" functionality in the Search feature. The PR successfully implemented most of the infrastructure including:

    • CONST definitions for GROUP_WEEK columns
    • UI components (WeekListItemHeader)
    • SearchTableHeader support
    • Styling for GROUP_WEEK columns
    • Date utility functions

    However, the PR missed adding WEEK support in three critical places that handle custom column selection:

    1. Type Definition: SearchCustomColumnIds in src/components/Search/types.ts line 142 only includes MONTH but not WEEK
    2. getCustomColumns(): Missing case for CONST.SEARCH.GROUP_BY.WEEK (line 3080 in SearchUIUtils.ts)
    3. getCustomColumnDefault(): Missing case for CONST.SEARCH.GROUP_BY.WEEK (line 3113 in SearchUIUtils.ts)

    Verification

    I verified the root cause by:

    • Examining PR Add support for groupBy week in Search #80684 diff which adds Week grouping support
    • Confirming CONST.SEARCH.GROUP_CUSTOM_COLUMNS.WEEK is properly defined (line 6993-6997 in CONST/index.ts)
    • Confirming CONST.SEARCH.GROUP_DEFAULT_COLUMNS.WEEK exists (line 7043)
    • Identifying that all other groupBy types (MONTH, TAG, MERCHANT, CATEGORY, etc.) have corresponding entries in SearchCustomColumnIds type and both helper functions
    • Confirming WEEK is conspicuously absent from these three locations

    Root Cause

    When a user selects "Group by: Week" and then clicks the "Columns" button to customize which columns to display, the code path fails because:

    1. The SearchCustomColumnIds type doesn't include WEEK column types
    2. The getCustomColumns(CONST.SEARCH.GROUP_BY.WEEK) function returns an empty array instead of the WEEK custom columns
    3. The getCustomColumnDefault(CONST.SEARCH.GROUP_BY.WEEK) function returns an empty array instead of default WEEK columns

    This results in no columns being available for selection, causing the UI to show missing/empty column options.

    Proposed Fix

    Add three missing cases:

    File 1: src/components/Search/types.ts (line ~142)

    type SearchCustomColumnIds =
        | ValueOf<typeof CONST.SEARCH.TYPE_CUSTOM_COLUMNS.EXPENSE>
        | ValueOf<typeof CONST.SEARCH.TYPE_CUSTOM_COLUMNS.EXPENSE_REPORT>
        | ValueOf<typeof CONST.SEARCH.GROUP_CUSTOM_COLUMNS.CARD>
        | ValueOf<typeof CONST.SEARCH.GROUP_CUSTOM_COLUMNS.FROM>
        | ValueOf<typeof CONST.SEARCH.GROUP_CUSTOM_COLUMNS.WITHDRAWAL_ID>
        | ValueOf<typeof CONST.SEARCH.GROUP_CUSTOM_COLUMNS.CATEGORY>
        | ValueOf<typeof CONST.SEARCH.GROUP_CUSTOM_COLUMNS.MERCHANT>
        | ValueOf<typeof CONST.SEARCH.GROUP_CUSTOM_COLUMNS.TAG>
        | ValueOf<typeof CONST.SEARCH.GROUP_CUSTOM_COLUMNS.MONTH>
        | ValueOf<typeof CONST.SEARCH.GROUP_CUSTOM_COLUMNS.WEEK>; // ADD THIS LINE

    File 2: src/libs/SearchUIUtils.ts (line ~3079)

    case CONST.SEARCH.GROUP_BY.MONTH:
        return Object.values(CONST.SEARCH.GROUP_CUSTOM_COLUMNS.MONTH);
    case CONST.SEARCH.GROUP_BY.WEEK: // ADD THIS CASE
        return Object.values(CONST.SEARCH.GROUP_CUSTOM_COLUMNS.WEEK);
    default:
        return [];

    File 3: src/libs/SearchUIUtils.ts (line ~3112)

    case CONST.SEARCH.GROUP_BY.MONTH:
        return CONST.SEARCH.GROUP_DEFAULT_COLUMNS.MONTH;
    case CONST.SEARCH.GROUP_BY.WEEK: // ADD THIS CASE
        return CONST.SEARCH.GROUP_DEFAULT_COLUMNS.WEEK;
    default:
        return [];
  7. puneetlath commented on Jan 28, 2026

    @puneetlath
    Contributor

    Doesn't seem like it needs to block the deploy, but something we should address as follow-up.

    cc @cristipaval @neil-marcellini @trjExpensify

  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Jan 28, 2026
  9. trjExpensify commented on Jan 28, 2026

    @trjExpensify
    Contributor

    Yeah, agreed it's not a deploy blocker, but let's address it!

  10. self-assigned this
    on Jan 29, 2026
  11. melvin-bot commented on Jan 31, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    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.

  12. trjExpensify commented on Feb 5, 2026

    @trjExpensify
    Contributor

    Done!

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringReviewingHas a PR in review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions