Skip to content

[Feature] Fix task status filtering #2

Closed

Description

@armnkumar321-spec

[Feature] Fix task status filtering

Problem Description

Users need to view tasks based on their workflow phase: TODO, IN_PROGRESS, or COMPLETED. The status filter dropdown is present in the UI, but selecting an option does not filter the task list.

Current Behavior

The status dropdown in TaskFilters.jsx updates the statusFilter state, but in frontend/src/hooks/useTasks.js, matchesStatus unconditionally returns true. Consequently, selecting "To Do", "In Progress", or "Completed" leaves the list unchanged.

Expected Behavior

  • Selecting "To Do" displays only tasks with status === 'TODO'.
  • Selecting "In Progress" displays only tasks with status === 'IN_PROGRESS'.
  • Selecting "Completed" displays only tasks with status === 'COMPLETED'.
  • Selecting "All Statuses" or clicking the Reset button restores all tasks.
  • Works correctly in combination with search queries and priority filters.

Acceptance Criteria

  • Selecting any status filters tasks strictly by that status value.
  • Selecting "ALL" restores all tasks without status restrictions.
  • Combines with search filter (Issue 1) and priority filter (Issue 3).
  • Preserves backend role permissions (standard users only see their assigned tasks).

Relevant Files and Components

  • frontend/src/hooks/useTasks.js (line ~50: matchesStatus)
  • frontend/src/components/TaskFilters.jsx
  • frontend/src/pages/TasksPage.jsx

Steps to Reproduce

  1. Log in and navigate to /tasks.
  2. Locate the "Filter by Status" dropdown (currently displaying "All Statuses").
  3. Select "Completed" from the dropdown.
  4. Observe that TODO and IN_PROGRESS tasks are still displayed on the table.

Suggested Test Cases

  1. Filter TODO: Select "To Do" -> only tasks with the grey "To Do" badge appear.
  2. Filter IN_PROGRESS: Select "In Progress" -> only tasks with the blue "In Progress" badge appear.
  3. Filter COMPLETED: Select "Completed" -> only tasks with the green "Completed" badge appear.
  4. Reset: Click "Reset" button -> all permitted tasks are restored.

Suggested Labels

enhancement, good first issue

Activity

  1. added
    enhancement
    good first issue
    on Oct 11, 2026
  2. adityamukesh commented on Oct 11, 2026

    @adityamukesh
    Contributor

    Hi Aman, I’d like to work on this issue.

    I reviewed useTasks.js and TaskFilters.jsx. The dropdown already supplies the correct status values; the problem is that matchesStatus always returns true.

    I’ll implement exact matching for TODO, IN_PROGRESS, and COMPLETED, with ALL removing the status restriction. Filtering will operate on the tasks returned by the API, preserving backend role permissions and composing with the search and priority predicates.

    I’ll verify each status, Reset, switching back to All Statuses, empty results, and refreshing the list after a task’s status changes. I’ll keep the PR small and readable, with build/lint results and clear verification steps.

    Could you please assign this issue to me (@adityamukesh)? I’ll wait for assignment before starting implementation.

  3. armnkumar321-spec commented on Oct 11, 2026

    @armnkumar321-spec
    OwnerAuthor

    Thanks for your interest in Issue #2! Your approach looks good. I'll assign this issue to you. Please wait for the assignment before starting implementation. Once assigned, fix the status filtering, test all statuses and edge cases, and submit a small, focused PR with the test results.

  4. added a commit that references this issue on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementgood first issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions