Skip to content

Issue #4 - [FEATURE] Sort action items by due date in database queries #8

@zenocross

Description

@zenocross

Description

Action items are currently returned in an unsorted order from the database, making it difficult for users to prioritize tasks. Items should be sorted by due date to show the most urgent tasks first.

Current Behavior

  • Action items retrieved from database
  • No specific sorting order applied
  • Items appear in creation order or random order
  • Users cannot easily identify upcoming deadlines

Expected Behavior

  • Action items automatically sorted by due date
  • Items with nearest due dates appear first
  • Items without due dates appear at the end
  • Consistent sorting across all views

Use Cases

  • Task prioritization: Users see most urgent tasks first
  • Deadline awareness: Upcoming due dates are immediately visible
  • Better organization: Logical ordering improves task management

Steps to Reproduce

  1. Create multiple action items with different due dates
  2. View action items list in app
  3. Observe ordering of items
  4. Items not sorted by due date chronologically

Proposed Solution

Modify the database query for action items to:

  • Add ORDER BY clause for due_date field
  • Handle NULL due dates (sort to end of list)
  • Ensure sorting works with pagination if implemented
  • Test query performance with sorting

Technical Context

  • Component: Database query layer
  • Type: Feature enhancement
  • Language: Python
  • File: Database/API file handling action items retrieval
  • Implementation: SQL/ORM query modification

Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureAuto-created label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions