Add Activity Timeline feature and database migrations
- 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>
This commit is contained in:
24
migrations/009_add_ticket_templates.sql
Normal file
24
migrations/009_add_ticket_templates.sql
Normal file
@@ -0,0 +1,24 @@
|
||||
-- Migration 009: Add ticket templates
|
||||
-- Creates ticket_templates table for reusable ticket templates
|
||||
|
||||
CREATE TABLE ticket_templates (
|
||||
template_id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
template_name VARCHAR(100) NOT NULL,
|
||||
title_template VARCHAR(255) NOT NULL,
|
||||
description_template TEXT NOT NULL,
|
||||
category VARCHAR(50),
|
||||
type VARCHAR(50),
|
||||
default_priority INT DEFAULT 4,
|
||||
created_by INT,
|
||||
is_active BOOLEAN DEFAULT TRUE,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (created_by) REFERENCES users(user_id),
|
||||
INDEX idx_template_name (template_name)
|
||||
);
|
||||
|
||||
-- Insert default templates
|
||||
INSERT INTO ticket_templates (template_name, title_template, description_template, category, type, default_priority) VALUES
|
||||
('Hardware Failure', 'Hardware Failure: [Device Name]', 'Device: \nIssue: \nError Messages: \nTroubleshooting Done: ', 'Hardware', 'Problem', 2),
|
||||
('Software Installation', 'Install [Software Name]', 'Software: \nVersion: \nLicense Key: \nInstallation Path: ', 'Software', 'Install', 3),
|
||||
('Network Issue', 'Network Issue: [Brief Description]', 'Affected System: \nSymptoms: \nIP Address: \nConnectivity Tests: ', 'Hardware', 'Problem', 2),
|
||||
('Maintenance Request', 'Scheduled Maintenance: [System Name]', 'System: \nMaintenance Type: \nScheduled Date: \nDowntime Expected: ', 'Hardware', 'Maintenance', 4);
|
||||
Reference in New Issue
Block a user