Skip to content

Move task completion tracking from AssignmentTask to UserProjectAssignment for per-user task status #34

@ImSk1

Description

@ImSk1

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:

  1. Global completion state: AssignmentTask.IsCompleted affects all users working on the same project assignment
  2. No per-user task tracking: There's no way to track which tasks each individual user has completed
  3. Data integrity issues: Multiple users working on the same project would interfere with each other's progress
  4. 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 IsCompleted property from AssignmentTask entity
  • 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 to UserAssignmentTask collection
  • UserProfile: Add navigation property to UserAssignmentTask collection
  • UserProjectAssignment: Add computed properties for task progress

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions