Skip to content

Feat: Implement GET v1/tasks/watchlist/ API to list tasks in user's watchlist #59

@Achintya-Chatterjee

Description

@Achintya-Chatterjee

Issue Description

Implement a RESTful API endpoint to retrieve a list of all tasks that an authenticated user has added to their personal watchlist. This supports the "Watchlist" USP feature and its dedicated tab.

Expected Behaviour

When the API is called by an authenticated user:

  1. It should return a list of all tasks currently in that user's watchlist.
  2. The list should be paginated, similar to the main /tasks/ endpoint.
  3. It should support sorting options relevant to a watchlist (e.g., by priority, due date, date added to watchlist). PRD: "Watchlist items should be prioritised for easier tracking."
  4. The API should return a 200 OK status on success.
  5. If the watchlist is empty, it should return an empty list with a 200 OK status.

Current Behaviour

Currently:

  1. There is no dedicated endpoint to list tasks in a user's watchlist.
  2. Watchlisted tasks (once implemented) would not be easily viewable in a separate list for the dedicated tab.

Screenshots

N/A

Reproducibility

  • This issue is reproducible
  • This issue is not reproducible

Steps to Reproduce

  1. Add one or more tasks to the watchlist (once the "add to watchlist" API is implemented).
  2. Attempt to GET `v1/tasks/watchlist/`.
  3. Observe that the endpoint does not exist, and there's no dedicated way to list watchlisted tasks.

Severity/Priority

  • Critical
  • High (Supports a core USP Feature's dedicated view)
  • Medium
  • Low

Additional Information

  • This endpoint will query tasks based on their association with the authenticated user's watchlist.
  • The task data returned should be consistent with other task-listing endpoints.

Checklist

  • I have read and followed the project's code of conduct.
  • I have searched for similar issues before creating this one.
  • I have provided all the necessary information to understand and reproduce the issue.
  • I am willing to contribute to the resolution of this issue.

Metadata

Metadata

Labels

feature taskA big ticket item that needs to come up as a feature

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions