Add Task-Level Admin Functionality
- Dominant language
- Python
- Stars
- 451
- Forks
- 707
- Avg merge
- 22h 59m
- Merged PRs (30d)
- 91
Description
**Is your feature request related to a problem? Please describe.**
Currently, the mentorship portal has robust admin functionality at the Program and Module levels, but lacks comprehensive admin controls at the Task level. While basic task operations exist (setting/clearing deadlines via mutations), there's no dedicated interface or comprehensive tooling for admins to:
- View all tasks across a module or program
- Update task status (TODO, IN_PROGRESS, IN_REVIEW, COMPLETED)
- Bulk manage multiple tasks
- Filter and search tasks by various criteria
- Track task completion rates and progress metrics
- Manually reassign tasks or adjust task metadata
The current implementation in:
- Task model has fields for `status`, `assigned_at`, `deadline_at`
- Module mutations only provide `set_task_deadline` and [clear_task_deadline]
- No GraphQL queries exist to fetch task lists or aggregate task data
- No frontend UI exists for comprehensive task management
**Describe the solution you'd like**
Implement comprehensive task-level admin functionality across the backend and frontend:
Backend Changes:
1. Create TaskNode GraphQL type
2. Add Task queries
3. Add Task mutations
4. Add to ModuleNode
Frontend Changes:
1. Create Task Management Page
> frontend/src/app/my/mentorship/programs/[programKey]/tasks/page.tsx
Display all tasks across program with filters and actions
2. Create Module Task View
> frontend/src/app/my/mentorship/programs/[programKey]/modules/[moduleKey]/tasks/page.tsx
Display tasks for specific module with detailed views
3. Add Task Table Component
> frontend/src/components/TaskTable.tsx
Reusable table with sorting, filtering, status updates
4. Add Task Status Badge Component
> frontend/src/components/TaskStatusBadge.tsx
Visual indicator for task status with color coding
5. Add GraphQL queries/mutations
```typescript
in frontend/src/server/queries/taskQueries.ts
export const GET_MODULE_TASKS = gql`
query GetModuleTasks(
$programKey: String!
$moduleKey: String!
$status: TaskStatusEnum
$limit: Int
) {
getModule(programKey: $programKey, moduleKey: $moduleKey) {
tasks(status: $status, limit: $limit) {
id
status
assignedAt
deadlineAt
assignee { login, name, avatarUrl }
issue { number, title, state }
}
}
}
`
```
**Are you going to work on implementing this?**
- [x] Yes
- [ ] No
**Additional context**
- Task model exists: backend/apps/mentorship/models/task.py
- Has `status` field with choices: TODO, IN_PROGRESS, IN_REVIEW, COMPLETED
- Has metadata `JSONField` for extensibility
- Currently only used for deadline tracking, not status management
Reference: #2701
Contributor guide
Assessment
This issue has not been assessed yet.