Skip to content

Take-Home Assignment Submission –> Pritul Singh - #79

Open
pritulsingh wants to merge 3 commits into
rohit-ups:mainfrom
pritulsingh:take-home-assignment
Open

Take-Home Assignment Submission –> Pritul Singh#79
pritulsingh wants to merge 3 commits into
rohit-ups:mainfrom
pritulsingh:take-home-assignment

Conversation

@pritulsingh

Copy link
Copy Markdown

Summary

This PR fixes two existing bugs identified through testing and adds task assignment functionality.

Changes

Bug Fixes

  • Fixed pagination offset calculation so page=1 correctly returns the first page of tasks.
  • Fixed task completion so the existing task priority is preserved instead of being reset to medium.

Task Assignment

  • Added PATCH /tasks/:id/assign endpoint.
  • Added assignTask() to the task service.
  • Added validation for the assignee field.
  • Supports reassigning an already assigned task.

Tests

Added unit and integration tests covering:

  • Task creation and defaults
  • Task retrieval and filtering
  • Pagination
  • Task statistics and overdue tasks
  • Task updates and deletion
  • Task completion
  • Task assignment
  • Invalid request validation and API error responses

Documentation

  • Added BUGS.md documenting the discovered bugs, causes, and fixes.
  • Added SUBMISSION.md with additional testing considerations and production questions.

Notes

The existing behaviors around partial status matching, unvalidated status query parameters, and page=0 handling were documented but intentionally left unchanged as they were considered outside the scope of this pass.

fix: correct pagination and task completion behavior
test: improve task route and service coverage
docs: add bug report and submission notes
@pritulsingh pritulsingh changed the title fix: addressed task API bugs and added task assignment Take-Home Assignment Submission –> Pritul Singh Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant