Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Let users sort the task list

Open
#16 2 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@ayush14cyber is already working on this.

Since Oct 18, 2026.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
70/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
express, javascript, mongodb, nodejs, react

Research direction

Start with the getTasks function in server/src/controllers/taskController.js, then the filters row and fetchTasks in client/src/pages/Tasks.jsx. Read the existing getQueryString helper, and add the sort parameter with the four values and a fallback to newest. Priority needs a rank, not alphabetical order, so the aggregation hint applies. Done when GET /api/v1/tasks?sort=priority&status=todo returns high-priority to-dos first, ?sort=banana returns newest first, and the UI dropdown reorders the list. Document the parameter in README.md.

Written by the indexing model from the issue text.

Description

backend difficulty: medium enhancement frontend hacktoberfest help wanted
Context

Tasks are always listed newest first. Users should be able to sort by priority (to see urgent work first) and by title. This touches both the API and the UI.

Files likely involved
  • server/src/controllers/taskController.js (getTasks)
  • client/src/pages/Tasks.jsx (filters row and fetchTasks)
  • README.md (API table: document the new parameter)
Acceptance criteria

API

  • GET /api/v1/tasks accepts ?sort= with these values: newest (default), oldest, priority (high → medium → low, then newest), title (A → Z).
  • Unknown values fall back to newest. Read the value with the existing getQueryString helper, like the other parameters.
  • Search, filters and pagination still work together with sorting.
  • Hint: sorting the text priority alphabetically gives high, low, medium, which is wrong. One option is a MongoDB aggregation with $addFields and $indexOfArray: [["high", "medium", "low"], "$priority"] to sort by rank.

UI

  • A "Sort by" dropdown next to the existing filters, with the four options.
  • Changing it reloads the list and goes back to page 1 once pagination exists (see the issue "Tasks page only shows the 20 newest tasks").
How to test
  1. Create tasks with different priorities and titles.
  2. Try each sort option in the UI and check the order.
  3. In Postman: GET /api/v1/tasks?sort=priority&status=todo returns only to-do tasks, high priority first. ?sort=banana returns newest first.

New here? 👋 Comment below to ask to work on this issue, and wait to be assigned. Then follow CONTRIBUTING.md for setup and how to open a pull request. Questions are welcome in the comments or in Discussions.

Dominant language
JavaScript
Stars
3
Forks
2
Avg merge
7h 8m
Merged PRs (30d)
38

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from KEX-03/taskflow

All issues in KEX-03/taskflow

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.