Skip to content

[$250] Reports - Task cannot be opened from Reports > Task #81789

Closed

Description

@lanitochka17

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.15-8
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-4454/55614645/1172745437?q=task&issue_type=jira
Email or phone of affected tester (no customers): sddhonisjsoijdsido@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Search

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create a new Gmail account.
  3. Complete the onboarding with Track and budget expenses intent.
  4. Go to Reports > Expenses.
  5. Click Type > Task > Apply.
  6. Click on any task.

Expected Result:

Task will be opened.

Actual Result:

Task cannot be opened from Reports > Task.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7070810_1770479714031.Screen_Recording_2026-02-07_at_23.52.56.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @rojiphil
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022020257760591516196
  • Upwork Job ID: 2020257760591516196
  • Last Price Increase: 2026-02-14

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 7, 2026
  2. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 7, 2026
  3. melvin-bot commented on Feb 7, 2026

    @melvin-bot

    Triggered auto assignment to @stephanieelliott (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.

  4. melvin-bot commented on Feb 7, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @rojiphil (External)

  5. twilight2294 commented on Feb 7, 2026

    @twilight2294
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    When users navigate to Reports > Task and click on a task item in the search results, nothing happens — the task cannot be opened.

    What is the root cause of that problem?

    The root cause is that the onSelectRow handler in the Search component has no logic to handle TaskListItemType items.

    In src/components/Search/index.tsx, the onSelectRow function processes clicks on search result rows. It has specific handling for transaction items, report action items, transaction group items, and various group types (members, cards, categories, etc.), but it completely lacks handling for task items.

    When a task item is clicked, the function processes through all the type checks and eventually reaches this guard clause at lines 1080-1082:

    // After handling all group types, item should be TransactionListItemType, ReportActionListItemType, or TransactionGroupListItemType
    if (!isTransactionItem && !isReportActionListItemType(item) && !isTransactionGroupListItemType(item)) {
        return;
    }

    A TaskListItemType item is none of these types (it doesn't have a transactionID, reportActionID, or transactions array), so it hits the early return and no navigation occurs. The function silently exits without opening the task.

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

    We should add explicit handling for TaskListItemType items in the onSelectRow function, just before the guard clause at line 1080.

    In src/components/Search/index.tsx, add this code:

    // Handle task items - navigate to the task report
    if (isTaskListItemType(item)) {
        const taskItem = item as TaskListItemType;
        const reportID = taskItem.reportID;
    
        if (!reportID) {
            return;
        }
    
        const backTo = Navigation.getActiveRoute();
        Performance.markStart(CONST.TIMING.OPEN_REPORT_SEARCH);
        Timing.start(CONST.TIMING.OPEN_REPORT_SEARCH);
        startSpan(`${CONST.TELEMETRY.SPAN_OPEN_REPORT}_${reportID}`, {
            name: 'Search',
            op: CONST.TELEMETRY.SPAN_OPEN_REPORT,
        });
    
        requestAnimationFrame(() => Navigation.navigate(ROUTES.SEARCH_REPORT.getRoute({reportID, backTo})));
        return;
    }

    You'll also need to add TaskListItemType to the imports from @components/SelectionListWithSections/types at the top of the file if it's not already imported.

    This follows the same navigation pattern used for chat/report action items at line 1131, using ROUTES.SEARCH_REPORT.getRoute() with the task's reportID (which is available in the SearchTask type).

    What alternative solutions did you explore?

    An alternative would be to navigate to a task-specific route if one exists, but SEARCH_REPORT is the appropriate route since it handles opening any report by reportID, and tasks are a type of report in Expensify's architecture.

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    and removed
    ExternalAdded to denote the issue can be worked on by a contributor
    on Feb 7, 2026
  7. melvin-bot commented on Feb 7, 2026

    @melvin-bot

    Current assignee @rojiphil is eligible for the External assigner, not assigning anyone new.

  8. changed the title [-]Reports - Task cannot be opened from Reports > Task[/-] [+][$250] Reports - Task cannot be opened from Reports > Task[/+] on Feb 7, 2026
  9. melvin-bot commented on Feb 7, 2026

    @melvin-bot
  10. 21 remaining items

  11. michaellinhq commented on Feb 13, 2026

    @michaellinhq

    Hi, I reviewed '[$250] Reports - Task cannot be opened from Reports > Task' and can start immediately. I can deliver a first usable version quickly and iterate based on your feedback. If this scope still matches your priority, I can proceed right away.

  12. melvin-bot commented on Feb 13, 2026

    @melvin-bot

    📣 @michaellinhq! 📣
    Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
    Please follow these steps:

    1. Make sure you've read and understood the contributing guidelines.
    2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
    3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
    4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
      Screen Shot 2022-11-16 at 4 42 54 PM
      Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
    
  13. michaellinhq commented on Feb 13, 2026

    @michaellinhq

    Hi, I reviewed '[$250] Reports - Task cannot be opened from Reports > Task' and can start immediately. I can deliver a first usable version quickly and iterate based on your feedback. If this scope still matches your priority, I can proceed right away.

  14. rojiphil commented on Feb 13, 2026

    @rojiphil
    Contributor

    @stephanieelliott Let us close the issue as it is fixed already.

    81789-web-chrome-001.mp4
  15. michaellinhq commented on Feb 13, 2026

    @michaellinhq

    Hi, I reviewed '[$250] Reports - Task cannot be opened from Reports > Task' and can start immediately. I can deliver a first usable version quickly and iterate based on your feedback. If this scope still matches your priority, I can proceed right away.

  16. michaellinhq commented on Feb 13, 2026

    @michaellinhq

    Hi, I reviewed '[$250] Reports - Task cannot be opened from Reports > Task' and can start immediately. I can deliver a first usable version quickly and iterate based on your feedback. If this scope still matches your priority, I can proceed right away.

  17. michaellinhq commented on Feb 13, 2026

    @michaellinhq

    Hi, I reviewed '[$250] Reports - Task cannot be opened from Reports > Task' and can start immediately. I can deliver a first usable version quickly and iterate based on your feedback. If this scope still matches your priority, I can proceed right away.

  18. HiepPP commented on Feb 14, 2026

    @HiepPP
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    When users navigate to Reports > Expenses, filter by Type > Task, and click on a task item in the search results, nothing happens. The task detail page fails to open and the click is silently ignored.

    What is the root cause of that problem?

    The root cause is a regression introduced by PR #80833. In src/components/Search/index.tsx, the onSelectRow function extracts reportID from TransactionListItemType and ReportActionListItemType items, but not from TaskListItemType items.

    At line 1123, the code only considers transaction and report action types:

    const transactionItem = item as TransactionListItemType;
    const reportActionItem = item as ReportActionListItemType;
    
    let reportID = transactionItem.reportID ?? reportActionItem.reportID;

    When the item is a TaskListItemType, neither cast produces a valid reportID because the task item structure is different. The type guard isTaskListItemType(item) exists and task items pass validation at line 1114, but the reportID is never extracted from them.

    This causes reportID to be undefined, triggering the early return at line 1133:

    if (!reportID) {
        return;
    }

    As a result, the task navigation code at lines 1167-1170 never executes.

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

    Add explicit TaskListItemType handling to the reportID extraction logic in src/components/Search/index.tsx:

    1. Add TaskListItemType to the imports from @components/SelectionListWithSections/types (line 16)

    2. Add taskItem cast and include it in the reportID extraction at lines 1121 and 1123:

    const transactionItem = item as TransactionListItemType;
    const reportActionItem = item as ReportActionListItemType;
    const taskItem = item as TaskListItemType;  // ADD THIS LINE
    
    let reportID = transactionItem.reportID ?? reportActionItem.reportID ?? taskItem.reportID;  // ADD taskItem.reportID

    This minimal change ensures that when a task item is clicked, its reportID is properly extracted, allowing the existing task navigation code to execute.

    What alternative solutions did you explore? (Optional)

    An alternative approach suggested by another proposal was to remove the guard clause entirely. However, this is dangerous because the guard exists to prevent navigation with invalid report IDs. Removing it could cause runtime errors when unhandled item types are clicked.

    The correct approach is to handle tasks explicitly by including them in the reportID extraction logic, maintaining type safety while fixing the navigation bug.

    Another alternative was to add a separate task handling block before the guard clause with full telemetry. While this would work, it is unnecessary because the existing code at lines 1167-1170 already handles task navigation correctly - it just never gets reached due to the missing reportID extraction. The minimal fix of adding taskItem.reportID to the extraction chain is sufficient and follows the existing pattern used for other item types.

    Result

    After the fix:

    • Task items navigate correctly from Reports > Task filter
    • Transaction items continue to work as before
    • Report action items continue to work as before
    • The solution follows existing code patterns and maintains type safety
  19. melvin-bot commented on Feb 14, 2026

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  20. energypantry commented on Feb 16, 2026

    @energypantry

    Quick conversion proposal for this issue.

    24h verifiable deliverable:

    • By 2026-02-17T08:30:00Z (UTC), I will publish a draft PR that fixes opening Task from Reports, plus a reproducible verification checklist and acceptance mapping.

    Pricing (A/B/C):

    • A) USD 160 minimal fix patch + reproducible steps
    • B) USD 250 fix patch + targeted regression test + checklist
    • C) USD 380 full patch + regression test + fallback guard + handoff notes

    Acceptance CTA:

    • Reply A/B/C + acceptance checklist + preferred UTC start time.
  21. stephanieelliott commented on Feb 17, 2026

    @stephanieelliott
    Contributor

    This is no longer reproducible, closing!

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions