Skip to content

Sorting Features for Todo Items

Priyadarshini Saha requested to merge 74-sort-features-for-todo-item into main

Description

Adding sorting strategy for todo items

Issue

Issue 74

Feature

Adding sorting features for todo items. Sort by:

  • Title
  • Tag
  • Priority
  • Start Date
  • End Date

Tophatting

Use Postman collection

Expected current behavior

Calling the respective endpoint should return a collection of todo-items sorted by that property in ascending or descending order

Changes

  1. Sort By Title
  • Endpoint: http://localhost:8000/todo-item/sort-title?sort=:sort&list_id=:id
  • Request Params: - sort: Enum As (ASC/DESC) - list_id: Long
  1. Sort By Tag
  • Endpoint: http://localhost:8000/todo-item/sort-tag?sort=:sort&list_id=:id
  • Request Params: - sort: Enum As (ASC/DESC) - list_id: Long
  1. Sort By Priority
  • Endpoint: http://localhost:8000/todo-item/sort-priority?sort=:sort&list_id=:id
  • Request Params: - sort: Enum As (ASC/DESC) - list_id: Long
  • Note: ASC (High -> Low), DESC(Low -> High)
  1. Sort By End Date
  • Endpoint: http://localhost:8000/todo-item/sort-end-date?sort=:sort&list_id=:id
  • Request Params: - sort: Enum As (ASC/DESC) - list_id: Long
  1. Sort By Start Date
  • Endpoint: http://localhost:8000/todo-item/sort-start-date?sort=:sort&list_id=:id
  • Request Params: - sort: Enum As (ASC/DESC) - list_id: Long

Screenshots

  1. Sort By Title Screenshot_2022-11-25_at_1.21.42_AM
  2. Sort By Tag Screenshot_2022-11-25_at_1.21.57_AM
  3. Sort By Start Date Screenshot_2022-11-25_at_1.22.14_AM
  4. Sort By End Date Screenshot_2022-11-25_at_1.22.28_AM
  5. Sort By Priority Screenshot_2022-11-25_at_1.22.45_AM

Design Patterns

REST API + Sorting & Pagination from Spring JPA

Deviations

Were there any deviations from the original design or architecture plan. If yes, what were they ? No deviations!

Additional

  • Unit test written
  • Meets requirements
  • Cross-browser tested
  • Added/updated documentation as needed
  • Camel case style used

Closes #74 (closed)

Edited by Priyadarshini Saha

Merge request reports