Projects: Keep project tickets apart under Admin Settings Projects leaves a project's tickets off the tickets list's usual views with a Projects view of their own, out of the dashboard and menu counts and the Dispatch queue, with no SLA, while Mine, Workload and the calendar keep them in the project's color with the agent's color as a dot; a ticket taken out of its project, or every one when it is switched off, gets its SLA back counted from then; off by default; database 3.8.9 adds config_project_tickets_apart, config_project_ticket_color and tickets.ticket_sla_from; 26.11.9 changelog entries

This commit is contained in:
johnnyq
2026-11-17 21:26:50 -05:00
parent 475f27fc7f
commit 55e7f6cc5d
19 changed files with 318 additions and 14 deletions

View File

@@ -136,7 +136,8 @@ function dispatchWorkingDay() {
*/
function dispatchQueue($tab, array $filters = []) {
global $mysqli;
$where = TICKET_OPEN_SQL . " AND ticket_archived_at IS NULL" . clientScopeSql('ticket_client_id');
// A project's tickets are left to the project while they are kept apart (functions/project_tickets.php)
$where = TICKET_OPEN_SQL . " AND ticket_archived_at IS NULL" . clientScopeSql('ticket_client_id') . projectTicketsServiceSql('tickets.ticket_project_id');
$client_id = intval($filters['client_id'] ?? 0);
if ($client_id && hasClientAccess($client_id)) {
$where .= " AND ticket_client_id = $client_id";