- Add Activity Timeline tab to ticket view showing chronological history - Create getTicketTimeline() method in AuditLogModel - Update TicketController to load timeline data - Add timeline UI with helper functions for formatting events - Add comprehensive timeline CSS with dark mode support - Create migrations 007-010 for upcoming features: - 007: Ticket assignment functionality - 008: Status workflow transitions - 009: Ticket templates - 010: Bulk operations tracking 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
32 lines
1.1 KiB
SQL
32 lines
1.1 KiB
SQL
-- Migration 008: Add status workflow management
|
|
-- Creates status_transitions table for workflow validation
|
|
|
|
-- Table to define allowed status transitions
|
|
CREATE TABLE status_transitions (
|
|
transition_id INT AUTO_INCREMENT PRIMARY KEY,
|
|
from_status VARCHAR(50) NOT NULL,
|
|
to_status VARCHAR(50) NOT NULL,
|
|
requires_comment BOOLEAN DEFAULT FALSE,
|
|
requires_admin BOOLEAN DEFAULT FALSE,
|
|
is_active BOOLEAN DEFAULT TRUE,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
UNIQUE KEY unique_transition (from_status, to_status),
|
|
INDEX idx_from_status (from_status)
|
|
);
|
|
|
|
-- Insert default transitions
|
|
INSERT INTO status_transitions (from_status, to_status, requires_comment) VALUES
|
|
('Open', 'In Progress', FALSE),
|
|
('Open', 'Closed', TRUE),
|
|
('In Progress', 'Open', FALSE),
|
|
('In Progress', 'Closed', TRUE),
|
|
('Closed', 'Open', TRUE),
|
|
('Closed', 'In Progress', FALSE);
|
|
|
|
-- Add new status "Resolved"
|
|
INSERT INTO status_transitions (from_status, to_status, requires_comment) VALUES
|
|
('In Progress', 'Resolved', FALSE),
|
|
('Resolved', 'Closed', FALSE),
|
|
('Resolved', 'In Progress', TRUE),
|
|
('Open', 'Resolved', FALSE);
|