Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Ticket Entity Interface #667

Closed
5 tasks
Tracked by #1967
humansinstitute opened this issue Nov 22, 2024 · 2 comments · Fixed by #673
Closed
5 tasks
Tracked by #1967

Create Ticket Entity Interface #667

humansinstitute opened this issue Nov 22, 2024 · 2 comments · Fixed by #673
Assignees
Labels

Comments

@humansinstitute
Copy link
Collaborator

Context

  • We need a standardized data structure to represent tickets in our system
  • This interface will serve as the foundation for ticket management operations
  • It will ensure consistency in ticket data across the system
  • The interface will support basic CRUD (Create, Read, Update, Delete) operations

Task

  1. Create a TypeScript interface for the Ticket entity
  2. Implement basic CRUD operations for the interface
  3. Add validation for required fields
  4. Create unit tests for the interface operations
  5. Document the interface and its usage

Outcome

A fully typed and tested ticket interface that can be used throughout the application, with complete CRUD functionality.

Design

Interface Definition

interface Ticket {
  uuid: string;              // Unique identifier for the ticket
  feature_uuid: string;      // Reference to associated feature
  phase_uuid: string;        // Reference to development phase
  name: string;              // Ticket name/title
  sequence: number;          // Order/priority in workflow
  dependency?: string[];     // Optional array of dependent ticket UUIDs
  description: string;       // Detailed ticket description
  status: TicketStatus;      // Current ticket status
  version: number;           // Version number for tracking changes
  created_at: Date;         // Creation timestamp
  updated_at: Date;         // Last update timestamp
}

enum TicketStatus {
  DRAFT = 'DRAFT',
  READY = 'READY',
  IN_PROGRESS = 'IN_PROGRESS',
  TEST = 'TEST',
  DEPLOY = 'DEPLOY',
  PAY = 'PAY',
  COMPLETE = 'COMPLETE'
}

Data Validation Requirements

  • All UUIDs must be valid UUID v4 format
  • Name must be non-empty and under 200 characters
  • Sequence must be a positive integer
  • Status must be one of the defined enum values
  • Created_at and updated_at must be valid dates

Acceptance Criteria

  • TypeScript interface compiles without errors
  • All fields are properly typed
  • Interface follows naming conventions
  • Validation tests for all required fields
  • Interface is properly exported
@MahtabBukhari
Copy link
Contributor

@humansinstitute Could you please assign me?

@saithsab877
Copy link
Contributor

@humansinstitute Please assign me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants