Tickets: more than one agent can work a ticket - Additional agents under Assigned to adds helpers while the ticket stays with its lead, each booked with the lead, at a time of their own or not booked, finding it under Mine and on the dashboard, emailed the client's replies and sent their own booking with a calendar file; the tickets list and board show +1 or Helping, and helper bookings show on the calendar in the helper's color, can be dragged to a time of their own, appear in calendar links and count in double-booking warnings; database 3.8.5 adds ticket_helpers; 26.11.9 changelog entries

This commit is contained in:
johnnyq
2026-11-17 20:54:44 -05:00
parent bf1124570b
commit 9260da0cbc
17 changed files with 939 additions and 14 deletions

View File

@@ -0,0 +1,29 @@
<?php
/*
* ITFlow - Database update to version 3.8.5 (from 3.8.4)
* Included by admin/database_updates.php - do not access directly
*
* Additional agents on a ticket (functions/ticket_helpers.php): ticket_helpers, the
* agents helping the assigned (lead) agent - each booked at the same time as the
* lead (follows_lead), at a time of their own (schedule_start / schedule_end, in
* company time), or not booked. The lead stays tickets.ticket_assigned_to.
*
* Re-runnable: the table is made only where it isn't there yet.
*/
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
mysqli_query($mysqli, "CREATE TABLE IF NOT EXISTS `ticket_helpers` (
`ticket_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`follows_lead` tinyint(1) NOT NULL DEFAULT 1,
`schedule_start` datetime DEFAULT NULL,
`schedule_end` datetime DEFAULT NULL,
`added_by` int(11) NOT NULL DEFAULT 0,
`added_at` datetime NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`ticket_id`, `user_id`),
KEY `ticket_helpers_user` (`user_id`),
CONSTRAINT `ticket_helpers_ticket` FOREIGN KEY (`ticket_id`) REFERENCES `tickets` (`ticket_id`) ON DELETE CASCADE,
CONSTRAINT `ticket_helpers_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci");