-
Notifications
You must be signed in to change notification settings - Fork 14
fix: show team-assigned tasks only on POC dashboard #234
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
fix: show team-assigned tasks only on POC dashboard #234
Conversation
- Modified TaskRepository._get_assigned_task_ids_for_user to include POC check - Team-assigned tasks now only appear on personal dashboard if user is POC - Team page (GET /v1/tasks?teamId=xxx) remains unchanged - shows all team tasks - Regular team members can still view team tasks via team-specific endpoint - Maintains existing functionality for user-assigned tasks
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Summary by CodeRabbit
WalkthroughA new private class method for retrieving all task IDs assigned to a team, either directly or through its members, has been added to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant TaskRepository
participant TeamRepository
User->>TaskRepository: list/count tasks for user
TaskRepository->>TeamRepository: get teams for user
loop For each team
TaskRepository->>TeamRepository: is_user_spoc(user, team)
alt User is SPOC
TaskRepository->>TaskRepository: _get_assigned_task_ids_for_team(team)
end
end
TaskRepository->>User: Return filtered task list/count
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Assessment against linked issues
Poem
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment
|
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.
I've completed my review and didn't find any issues... but I did find this squirrel.
_.-"""-,
.' ..::. `\
/ .::' `'` /
/ .::' .--.=;
| ::' / C ..\
| :: | \ _.)
\ ':| / \
'-, \./ \)\)
`-| );/
'--'-'
Files scanned
File Path | Reviewed |
---|---|
todo/repositories/task_repository.py | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
…trieval - Replace memory-heavy for loop in _get_assigned_task_ids_for_user with efficient MongoDB queries - Fix ObjectId/string data type mismatch that prevented team tasks from appearing on POC dashboard - Reduce database calls from N+1 to 2 queries for better performance - Ensure tasks assigned to teams are correctly displayed on POCs dashboard
Date:
July 28, 2025
Developer Name: @Achintya-Chatterjee
Issue Ticket Number
Description
TaskRepository._get_assigned_task_ids_for_user
to include POC checkGET /v1/tasks?teamId={teamId}
) remains unchanged - shows all team tasksDocumentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
Screenshot 1
Screen.Recording.2025-07-28.at.17.22.18.mp4
Test Coverage
Screenshot 1
Additional Notes
Description by Korbit AI
What change is being made?
Update the task assignment logic to ensure that team-assigned tasks are only shown on the POC (Point of Contact) dashboard and refactor related test cases to use the
RemoveTeamMemberView
.Why are these changes being made?
The changes ensure that only users who are POCs for a team can see tasks assigned to the team in their dashboard, improving role-specific visibility. The modification aligns the logic with business requirements, focusing on security and clarity by updating view logic and enhancing test robustness.