bmc_hub/migrations/1036_sag_individual_assignments.sql

13 lines
596 B
MySQL
Raw Normal View History

feat(planner): add overdue cases handling and improve case rendering - Introduced `overdueCases` state to track overdue cases in the planner. - Enhanced `loadCases` function to fetch and store overdue cases. - Updated `renderCases` to display overdue cases with appropriate labels. - Modified case card rendering to highlight overdue cases. fix(telefoni): ensure WebSocket connection on DOMContentLoaded - Adjusted WebSocket connection logic to handle cases where the script loads after DOMContentLoaded. test(tests): add tests for case creation and internal ticket handling - Added tests to ensure ticket creation commits all optional data. - Implemented tests for internal ticket creation, ensuring correct customer and user assignments. feat(migrations): add new tables for email configuration and case assignments - Created `email_connection_configurations` table for managing email settings. - Introduced `sag_case_assignees` table to handle individual case assignments. - Added `sag_case_details` table for structured case type details. - Updated existing case types to align with new templates and added support for internal tickets. fix(timetracking): allow manual time creation without case customer - Modified manual time creation to support entries without a customer. - Updated settlement options to recommend internal settlement for customerless time. feat(v4): enhance case detail template with new features - Added new features to the case detail template, including compact icons and inline relation creation. - Improved comment actions and time tracking functionalities.
2026-09-20 03:33:10 +02:00
-- Explicit employee assignments for a case. A group is only a picker/context;
-- each selected employee has a separate row.
CREATE TABLE IF NOT EXISTS sag_case_assignees (
sag_id INTEGER NOT NULL REFERENCES sag_sager(id) ON DELETE CASCADE,
user_id INTEGER NOT NULL REFERENCES users(user_id) ON DELETE CASCADE,
assigned_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
assigned_by_user_id INTEGER REFERENCES users(user_id) ON DELETE SET NULL,
PRIMARY KEY (sag_id, user_id)
);
CREATE INDEX IF NOT EXISTS idx_sag_case_assignees_user
ON sag_case_assignees(user_id, sag_id);