Implement Task Creation Functionality with Required Fields

Description

This task involves implementing the core functionality for creating new tasks within our cargo flight management system. Users need to be able to create tasks with essential information (title, description) while the system automatically captures metadata (creation date, modification date, author, status).

The implementation should follow the domain model where a Task entity contains all required fields and proper validation. This functionality is critical for enabling users to track and manage cargo flight-related activities.

User Story

As a task author, I want to create a new task with a title, description, creation date, modification date, author and status so that I can manage and track cargo flight-related activities.

Acceptance Criteria

  • Users can create a new task by providing a title and description
  • The system automatically sets the task status to "Open" upon creation
  • The system records the current authenticated user as the task author
  • The system automatically sets the creation date to the current date/time
  • The system automatically sets the modification date to match the creation date initially
  • All required fields are properly validated (title and description cannot be empty)
  • The task is persisted in the database with all required fields

BDD Scenario Titles

  • Creating a new task with required fields

Technical Notes

  • Implement the Task entity with all required fields:
    • title (string, required)
    • description (string, required)
    • creationDate (datetime)
    • modificationDate (datetime)
    • author (reference to User)
    • status (enum: "Open", "In Progress", "Completed", "Cancelled")
  • Ensure proper validation is implemented for all fields
  • Include unit and integration tests to cover the acceptance criteria and BDD scenario
  • Update API documentation to reflect the new endpoints

Related Links

  • Design Document
  • API Specification
Assignee Loading
Time tracking Loading