This is a Spring Boot (Java 17) based REST API that simulates a workforce task management system using in-memory data storage.
It allows creating, assigning, and managing tasks, including support for smart daily task views, dynamic priority handling, user comments, and full activity history logging.
- Java 17
- Spring Boot 3.0.4
- Gradle
- MapStruct
- Lombok
-
Task Reassignment Bug
Fixed duplication issue when reassigning a task by reference — now previous tasks are marked asCANCELLED. -
Cancelled Tasks in Fetch API
Modified fetch logic to excludeCANCELLEDtasks from the response.
-
Smart Daily Task View
Returns:- All active tasks within a selected date range.
- All open tasks started before the range but not yet completed.
-
Task Priority Management
- Add priority (HIGH, MEDIUM, LOW) when creating a task
- Update task priority via PATCH
- Filter tasks by priority
-
Comments & Activity Logs
- Add comments to any task
- Automatically logs key events (e.g., priority changes, comments)
- View a full task history with comments and activity timeline
src/main/java/com/yourcompany/workforcemgmt/
├── controller/ # REST endpoints
├── service/ # Business logic
├── service/impl/ # Service implementations
├── dto/ # Data Transfer Objects
├── model/ # Task model & enums
├── repository/ # In-memory repository
├── mapper/ # MapStruct mappers
├── common/
│ ├── exception/ # Global exception handling
│ ├── model/
│ │ ├── enums/ # Shared enums
│ │ └── response/ # Response wrapper classes
└── WorkforcemgmtApplication.java