Skip to content

Filtering by tag for TodoItem

Priyadarshini Saha requested to merge 65-filtering-for-todo-items into main

Description

Creating REST endpoints for filtering by:

  • priority
  • tag
  • completed
  • flagged
  • start date
  • end date

Issue

Issue 65

Feature

  • Added GET endpoints for filtering by priority, tag, flagged, completed, today, tomorrow

Tophatting

  • Use postman for to-batting

Expected current behavior

  • Call the following endpoints and receive a list of Todo Items Endpoints:
  1. Filter By Priority
  • Endpoint:localhost:8000/todo-item/filter-priority?priority=priority&list_id=id
  • Query Params:
    • priority: Enum (HIGH, MEDIUM, LOW)
    • list_id: Long
  • Response: List of todo items based on specified priority from a given list
  1. Filter By Tag
  • Endpoint:localhost:8000/todo-item/filter-tag?tag=tag&list_id=id
  • Query Params:
    • tag: String
    • list_id: Long
  • Response: List of todo items based on specified tag from a given list
  • Note: Pattern Matching based on 'tag' contained in any position
  1. Filter By Flagged
  • Endpoint:localhost:8000/todo-item/filter-flagged?flagged=flagged&list_id=id
  • Query Params:
    • flagged: Boolean
    • list_id: Long
  • Response: List of todo items which are flagged from given todo list
  1. Filter by Completed
  • Endpoint:localhost:8000/todo-item/filter-completed?completed=completed&list_id=id
  • Query Params:
    • completed: Boolean
    • list_id: Long
  • Response: List of todo items which are completed from given todo list
  1. Filter By Start Date
  • Endpoint:localhost:8000/todo-item/filter-start-date?date=date&list_id=id
  • Query Params:
    • date: String (format = "YY-MM-DD")
    • list_id: Long
  • Response: List of todo items which have specified start date
  • For Today: Pass in today's date to receive all items that have a start date of today
  1. Filter By End Date
  • Endpoint:localhost:8000/todo-item/filter-end-date?date=date&list_id=id
  • Query Params:
    • date: String (format = "YY-MM-DD")
    • list_id: Long
  • Response: List of todo items which have specified end date
  • For Today: Pass in today's date to receive all items that have a start end of today

Changes

  • Endpoint for Filter by priority, tag, flagged, completed, start date, end date

Screenshots

Filter by Priority

Screenshot_2022-11-24_at_5.42.06_AM

Filter by Tag

Screenshot_2022-11-24_at_5.41.12_AM

Filter by Flagged

Screenshot_2022-11-24_at_7.20.10_AM

Filter by Completed

Screenshot_2022-11-24_at_7.20.41_AM

Filter by Start Date

Screenshot_2022-11-24_at_7.21.51_AM

Filter By End Date

Screenshot_2022-11-24_at_7.22.13_AM

Design Patterns

None

Deviations

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

Additional

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

Closes #65 (closed)

Edited by Priyadarshini Saha

Merge request reports