-
Notifications
You must be signed in to change notification settings - Fork 273
Feat: Implement API for Tracking Orphaned Tasks #2252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Implement API for Tracking Orphaned Tasks #2252
Conversation
- tasks/orphaned-tasks retrieves tasks assigned to departed users Added test cases for the API and fixed test case issues arising from mock data additions used in current API testing.
… and the corresponding queries to model. - removed test cases from integration testing and moved it to unit testing. - moved updateTaskStatusToDone to tasks model as it was causing circular dependency. - created a separate fixture file for mock data required to test the feature. - reverted the test case changes done for other test cases due to mock data changes.
cfb3fb0
to
b4415d9
Compare
- Added function documentation for all the modified and new model functions. - Implemented a negative unit test case for the `fetchUsersNotInDiscordServer` function. - Updated `fetchUsersNotInDiscordServer` to use `userId` as a parameter instead of the entire `user` object. - Added test cases for recent model changes.
…the /tasks/orphaned-tasks API. - Implemented negative test cases for the /tasks/orphaned-tasks endpoint: - Tested the scenario where the dev flag is not provided, expecting a 404 status code with a "Route not found" message. - Tested the scenario where the database query fails, ensuring the API responds with a 500 status code and an appropriate error message.
… /tasks?orphaned=true route. Modifications in code and tests related to the same.
status, | ||
page, | ||
size, | ||
prev, | ||
next, | ||
q: queryString, | ||
assignee, | ||
title, | ||
userFeatureFlag, | ||
orphaned, | ||
dev, | ||
} = req.query; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we using all these query?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I only added orphaned and dev, it's prettier change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left comment
Splitting this PR into smaller parts for easier review. This PR will serve as the main split: #2267. Closing this PR as part of the process. |
Date: 15/11/2024
Developer Name: Vignesh B S
Issue Ticket Number
Closes Real-Dev-Squad/website-dashboard#888
Description
Implemented changes in tasks api for Tracking Orphaned Tasks
tasks?orphaned=true
- Retrieves tasks assigned to users who have departed the Discord server.Added test cases for the above api.
Documentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
Screenshot 1
Test Coverage
Screenshot 1
Additional Notes
PRD
Design Doc
Have moved the updateTaskStatusToDone function to models as it was directly interacts with the database and performing operations such as updating task documents. This was also causing circular dependency issues.