-
Notifications
You must be signed in to change notification settings - Fork 0
Labels
Description
Problem
Currently, the task completion system has a design flaw where AssignmentTask.IsCompleted is a global property that doesn't account for individual user progress. This creates several issues:
- Global completion state:
AssignmentTask.IsCompletedaffects all users working on the same project assignment - No per-user task tracking: There's no way to track which tasks each individual user has completed
- Data integrity issues: Multiple users working on the same project would interfere with each other's progress
- Loss of audit trail: No way to track when specific users completed specific tasks
Current Implementation Issues
AssignmentTask.IsCompleted: Global boolean that doesn't differentiate between users- Missing user context: No relationship between tasks and individual user assignments
- Inflexible progress tracking: Cannot track partial completion across multiple users
- Business logic conflicts: Users could mark tasks as complete/incomplete affecting other users
Proposed Solution
1. Remove global completion from AssignmentTask
- Remove
IsCompletedproperty fromAssignmentTaskentity - Tasks should represent the template/definition, not completion status
// REMOVE THIS PROPERTY:
/// <summary>
/// Gets or sets whether the task is completed
/// </summary>
public bool IsCompleted { get; set; } = false;2. Create new entity UserAssignmentTask
Create a new junction entity to track per-user task completion:
3. Update related entities
AssignmentTask: Add navigation property toUserAssignmentTaskcollectionUserProfile: Add navigation property toUserAssignmentTaskcollectionUserProjectAssignment: Add computed properties for task progress