mirror of
https://github.com/itflow-org/itflow
synced 2026-11-11 23:17:23 +00:00
Ticket templates stage 1: templates now set up the whole ticket - category, priority, billable, agent, due time and tags (migration 3.1.9 adds them, the ticket_template_tags table and tickets.ticket_template_id) - and fill [Client], [Contact], [Asset], [Site], [Agent], [Project], [Ticket], [Date], [Month], [Quarter] and [Year] in the subject, details and tasks when a ticket is raised, leaving other bracketed text for whoever picks it up; tickets remember the template they came from and each template shows how many tickets it raised, how many are open and when it was last used; the template picker fills New Ticket, the New Tickets windows on the assets and clients lists and recurring tickets, and project templates use each template's setup and agent; Admin > Ticket Templates rebuilt with search, Current/Archived, Copy, Archive/Restore and New ticket from it, and each template gets a page showing the ticket it starts, its tasks in drag-to-sort order with time estimates, what it sets up, its placeholders and the tickets, recurring tickets and project templates that use it; template handling moved into functions/ticket_template.php with ticketTemplateFinish, tagKeepIds and tagIdsFromValues split out of tagSetForRecord, and template task editing moved to admin/post; fixes editing a template task moving it to the top of the list, client bulk tickets skipping the template's tasks and time estimates, and the client bulk window not validating the agent, priority and category, and adds an option there to raise each client's ticket for its primary contact; changelog updated
This commit is contained in:
26
db.sql
26
db.sql
@@ -3363,6 +3363,23 @@ CREATE TABLE `ticket_tags` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `ticket_template_tags`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `ticket_template_tags`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `ticket_template_tags` (
|
||||
`ticket_template_id` int(11) NOT NULL,
|
||||
`tag_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`ticket_template_id`,`tag_id`),
|
||||
KEY `tag_id` (`tag_id`),
|
||||
CONSTRAINT `ticket_template_tags_ibfk_1` FOREIGN KEY (`ticket_template_id`) REFERENCES `ticket_templates` (`ticket_template_id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `ticket_template_tags_ibfk_2` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`tag_id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `ticket_templates`
|
||||
--
|
||||
@@ -3376,6 +3393,11 @@ CREATE TABLE `ticket_templates` (
|
||||
`ticket_template_description` text DEFAULT NULL,
|
||||
`ticket_template_subject` varchar(500) DEFAULT NULL,
|
||||
`ticket_template_details` longtext DEFAULT NULL,
|
||||
`ticket_template_category_id` int(11) NOT NULL DEFAULT 0,
|
||||
`ticket_template_priority` varchar(20) DEFAULT NULL,
|
||||
`ticket_template_billable` tinyint(1) DEFAULT NULL,
|
||||
`ticket_template_assigned_to` int(11) NOT NULL DEFAULT 0,
|
||||
`ticket_template_due_hours` int(11) NOT NULL DEFAULT 0,
|
||||
`ticket_template_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
`ticket_template_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
||||
`ticket_template_archived_at` datetime DEFAULT NULL,
|
||||
@@ -3465,12 +3487,14 @@ CREATE TABLE `tickets` (
|
||||
`ticket_invoice_id` int(11) NOT NULL DEFAULT 0,
|
||||
`ticket_project_id` int(11) NOT NULL DEFAULT 0,
|
||||
`ticket_recurring_ticket_id` int(11) DEFAULT 0,
|
||||
`ticket_template_id` int(11) NOT NULL DEFAULT 0,
|
||||
`ticket_order` int(11) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`ticket_id`),
|
||||
KEY `ticket_response_due_at` (`ticket_response_due_at`),
|
||||
KEY `ticket_resolution_due_at` (`ticket_resolution_due_at`),
|
||||
KEY `ticket_client_id` (`ticket_client_id`,`ticket_archived_at`),
|
||||
KEY `ticket_project_id` (`ticket_project_id`)
|
||||
KEY `ticket_project_id` (`ticket_project_id`),
|
||||
KEY `ticket_template_id` (`ticket_template_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user