PR 6: (#98) Unscheduled Tasks Management for Calendar#186
PR 6: (#98) Unscheduled Tasks Management for Calendar#186cj-ballesteros merged 5 commits intomainfrom
Conversation
…gistered it in Admin.py .
alliekameda
left a comment
There was a problem hiding this comment.
🔍 Peer Review: Great Job on This PR!
Hey Ethan 👋 — just finished reviewing your PR titled "PR 6: (#98) Unscheduled Tasks Management for Calendar #186". Here’s my feedback:
✅ What Looks Great
- The core feature has been implemented cleanly.
- Your model, views, serializers, and tests follow best practices — everything is logically structured and readable.
- The test coverage is excellent, with edge case handling and authentication scenarios well considered.
💡 Suggestions for Improvement
Not super urgent!
-
Consider adding a clean() method to UnscheduledTask if you foresee future validation needs (e.g., due_date should not be in the past).
-
If event_type values are reused in views or serializers, moving the EVENT_TYPE_CHOICES into a shared constant or enum might be beneficial long-term.
-
Adding test coverage for admin interfaces (optional but nice-to-have) could round out the suite.
-
Consider adding edge case tests for time-sensitive queries (e.g., what counts as "recent" when dealing with timezone offsets or year boundaries).
-
Could use factory methods or factories (e.g.,
AchievementFactory) for cleaner, DRYer test setup as the test suite grows.
🧪 Tested This Feature
I ran the following test steps:
- ✅ Verified migrations apply cleanly.
- ✅ Ran the planner test suite — all 25 tests passed.
- ✅ Skimmed the code for edge-case and permission logic.

🔄 Next Steps
- Consider edge cases and then merge :)
🚀 Final Thoughts
Everything looks good, great work Ethan! ᕙ( * •̀ ᗜ •́ * )ᕗ
There was a problem hiding this comment.
Hey Ethan 👋 — just finished reviewing your PR titled "PR 6: (#98) Unscheduled Tasks Management for Calendar #186". Here’s my feedback:
✅ What Looks Great
- The primary functionality is implemented in a clear and organized manner.
- Your models, views, serializers, and tests are well-structured and adhere to best practices, making the code easy to follow.
- The test coverage is thorough, effectively accounting for edge cases and authentication workflows.
🧪 Tested This Feature
🔄 Next Steps
- Consider edge cases and then merge :)
🚀 Final Thoughts
nice work Ethan!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #186 +/- ##
=======================================
Coverage 81.16% 81.16%
=======================================
Files 17 17
Lines 775 775
Branches 51 51
=======================================
Hits 629 629
Misses 123 123
Partials 23 23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Unscheduled Tasks Management for Calendar Integration
Added
UnscheduledTaskmodel toapps.planner, alongside API endpoints to fetch, create, update, and delete unscheduled tasks. Also added a comprehensive test suite covering all CRUD operations and edge cases.Overview
What does this PR do?
This PR introduces a new planner model, named
UnscheduledTask, which allows tracking and organization of tasks that have not yet been assigned to specific time slots or calendar events. This PR also involves:/api/unscheduled-tasks/Key Features & Changes
What has been added or changed?
✔ New model creation in
apps/planner/models.pyUnscheduledTask: Stores tasks that have not been assigned to specific times✔ Admin
UnscheduledTaskwith list display & filters inapps/planner/admin.py✔ Serializer
UnscheduledTaskSerializerinapps/planner/serializers.py✔ API endpoint Implementation (views & URLs)
- GET /api/unscheduled-tasks/: List all unscheduled tasks
- POST /api/unscheduled-tasks/: Create a new unscheduled task
- PATCH /api/unscheduled-tasks/{id}/: Update an existing unscheduled task
- DELETE /api/unscheduled-tasks/{id}/: Delete an unscheduled task
✔ API endpoint testing
Why This Is Needed
What problem does this solve?
Before this change, there was no way to track tasks that didn’t yet have a calendar slot or to manage them via API. Adding model, endpoints, and tests:
Related Issue
🔗 This PR addresses [Issue #98 - Implement management for unscheduled tasks to allow tracking and organization of tasks that have not yet been assigned to specific time slots or calendar events.]
Implementation Details
How was this feature developed?
IsAuthenticatedon all endpointsDesign Documentation (If Applicable)
Diagrams & Visuals
How to Test This PR
Step-by-step testing guide
Calendar_Unscheduled_TasksbranchFiles Added/Modified
📂 List of important files changed in this PR
apps/planner/models.pyUnscheduledTaskmodel with fields.apps/planner/admin.pyUnscheduledTaskin Django admin.apps/planner/serializers.pyUnscheduledTaskSerializerfor (de)serialization of task data.apps/planner/views.pyUnscheduledTaskViewSetwith full CRUD andIsAuthenticatedpermission.apps/planner/urls.py/api/unscheduled-tasks/via DRF router.apps/planner/tests.pyUnscheduledTaskAPITestCasecovering list/create/update/delete and few edge cases.AI Code Usage
🤖 Was AI-generated code used in this PR?
Checklist for Reviewers
Things to check before approving this PR:
UnscheduledTaskfully tested?Next Steps & Future Enhancements
What improvements can be made after merging?
CalendarEventmodel to accommodateAssignmentandUnscheduledTaskmodels.Final Notes
Thank you for reviewing! Any feedback or suggestions are greatly appreciated.
-- Ethan