Skip to content

omaherrao25/workforcemgmt-api

Repository files navigation

🚀 Workforce Management API

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.


📦 Tech Stack

  • Java 17
  • Spring Boot 3.0.4
  • Gradle
  • MapStruct
  • Lombok

🧠 Features Implemented

✅ Bug Fixes

  1. Task Reassignment Bug
    Fixed duplication issue when reassigning a task by reference — now previous tasks are marked as CANCELLED.

  2. Cancelled Tasks in Fetch API
    Modified fetch logic to exclude CANCELLED tasks from the response.


✨ New Features

  1. Smart Daily Task View
    Returns:

    • All active tasks within a selected date range.
    • All open tasks started before the range but not yet completed.
  2. Task Priority Management

    • Add priority (HIGH, MEDIUM, LOW) when creating a task
    • Update task priority via PATCH
    • Filter tasks by priority
  3. 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

📂 Project Structure

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

About

This repository contains a fully functional Java Spring Boot application for managing workforce tasks. It enables task creation, assignment, and status updates for employees. The system supports smart date-based task views, dynamic priority management, user comments, and complete activity history tracking.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages