Task Management & Kanban System
Relevant source files
The following files were used as context for generating this wiki page:
The Task Management & Kanban System is the core functional module of the Dashboard application, designed to facilitate team collaboration through task lifecycle tracking, subtask management, and visual progress monitoring. It allows users to create, assign, and transition tasks through various stages of completion while maintaining a historical record of all changes.
The system utilizes a Kanban-style board to provide a high-level overview of project health, enabling managers and team members to filter tasks by priority, status, and assignee. It integrates deeply with the notification and attachment systems to ensure all stakeholders are informed of progress and have access to necessary documentation.
Sources: README.md:12-25, src/main/resources/templates/kanban.html:42-55
System Architecture and Logic
The system is built on a Spring Boot backend with a Thymeleaf-based frontend, utilizing a service-oriented architecture to handle complex business logic, including role-based access control (RBAC) and automated status synchronization between parent tasks and subtasks.
Core Components and Data Flow
The data flow typically originates from the Kanban UI or Task Detail page, triggering service layer methods that interact with PostgreSQL repositories.
The diagram above illustrates the typical request flow for modifying a task, highlighting the integration of access validation and automated history logging.
Sources: src/main/java/com/example/demo/services/TaskService.java:234-260, src/main/resources/static/js/kanban.js:15-30
Task Lifecycle and Kanban Board
The Kanban board visualizes tasks in four primary columns, each representing a specific TaskStatus.
Status Definitions
| Column | Status Key | Description |
|---|---|---|
| New | NEW | Initial state for all created tasks. |
| In Progress | IN_PROGRESS | Tasks currently being worked on by assignees. |
| On Review | REVIEW | Completed tasks awaiting verification from a PM or Admin. |
| Done | DONE | Successfully completed tasks. |
Sources: README.md:79-85, src/main/resources/templates/kanban.html:58-185
Drag-and-Drop Implementation
The frontend implements drag-and-drop functionality via kanban.js, which captures the draggedTaskId and updates the backend status asynchronously when dropped into a new column.
This sequence ensures that the UI remains responsive by moving the DOM element immediately after a successful API response.
Sources: src/main/resources/static/js/kanban.js:7-38, src/main/resources/templates/kanban.html:69-72
Subtask Management and Automation
Subtasks allow for breaking down complex tasks into smaller, manageable units. The system enforces strict automation logic between subtasks and their parent tasks.
Automation Logic
The SubtaskService implements a recalculation method that automatically updates the parent task's status based on the state of its subtasks:
- Completion: If all subtasks of a task are moved to
DONE, the parent task status is automatically set toDONE. - Reversion: If a task is
DONEbut one of its subtasks is reopened (set toIN_PROGRESS), the parent task is reverted toIN_PROGRESS.
Sources: src/main/java/com/example/demo/services/SubtaskService.java:155-171, README.md:112-117
Role-Based Access Control (RBAC)
Access to task operations is strictly governed by the user's role: ADMIN, MANAGER, PM, and TEAM.
| Action | ADMIN | MANAGER | PM | TEAM |
|---|---|---|---|---|
| Create Task | ✅ | ✅ (Own Dept) | ❌ | ❌ |
| Edit Task | ✅ | ✅ (Own Tasks) | ✅ (Own Proj) | ❌ |
| Change Status | ✅ | ❌ | ✅ | ❌ |
| Delete Task | ✅ | ✅ (Own Dept) | ❌ | ❌ |
| View Task | All | Departmental | Project Only | Assigned Only |
Sources: README.md:32-50, src/main/java/com/example/demo/services/TaskService.java:60-78, src/main/java/com/example/demo/services/TaskService.java:319-359
Data Models
Task Entity
The Task entity contains metadata including priority levels and due date validation.
| Field | Type | Description |
|---|---|---|
title | String | Maximum 200 characters, mandatory. |
priority | Enum | LOW, MEDIUM, HIGH. Defaults to MEDIUM. |
dueDate | LocalDate | Mandatory. Cannot be in the past. |
isOverdue | Boolean | Automatically set if dueDate < current date and status != DONE. |
assignees | List | One-to-Many relationship with TaskAssignee. |
Sources: src/main/java/com/example/demo/entity/Task.java:23-75, src/main/java/com/example/demo/dto/request/TaskRequest.java:14-41
Task History Logging
Every significant change to a task (title, status, priority, assignees) is recorded in the TaskHistory table via the recordHistory method in TaskService. This provides a full audit trail visible in the task detail sidebar.
Sources: src/main/java/com/example/demo/services/TaskService.java:298-312, src/main/resources/templates/task-detail.html:150-156
Summary
The Task Management & Kanban System provides a robust framework for coordinating project activities. By combining visual Kanban management with automated subtask synchronization and strict RBAC, the system ensures data integrity and operational clarity. Key features like automatic overdue detection and comprehensive history tracking provide managers with the tools needed for effective project oversight.
Sources: README.md:12-25, src/main/java/com/example/demo/entity/Task.java:82-96