diff --git a/agent/ticket_kanban.php b/agent/ticket_kanban.php deleted file mode 100644 index 77666079..00000000 --- a/agent/ticket_kanban.php +++ /dev/null @@ -1,157 +0,0 @@ - - -id = $id; - $statuses[$id]->name = $name; - $statuses[$id]->tickets = []; - $statuses[$id]->order = $kanban_order; // Store the order -} - -$ordering_snippet = "ORDER BY - CASE - WHEN ticket_priority = 'High' THEN 1 - WHEN ticket_priority = 'Medium' THEN 2 - WHEN ticket_priority = 'Low' THEN 3 - ELSE 4 - END, - ticket_id DESC"; - -if ($config_ticket_ordering === 1) { - $ordering_snippet = "ORDER BY ticket_order ASC"; -} - -// Fetch tickets and merge into statuses -$sql = mysqli_query( - $mysqli, - "SELECT SQL_CALC_FOUND_ROWS * FROM tickets - LEFT JOIN clients ON ticket_client_id = client_id - LEFT JOIN contacts ON ticket_contact_id = contact_id - LEFT JOIN users ON ticket_assigned_to = user_id - LEFT JOIN assets ON ticket_asset_id = asset_id - LEFT JOIN locations ON ticket_location_id = location_id - LEFT JOIN vendors ON ticket_vendor_id = vendor_id - LEFT JOIN ticket_statuses ON ticket_status = ticket_status_id - LEFT JOIN categories ON ticket_category = category_id - WHERE $ticket_status_snippet " . $ticket_assigned_query . " - $category_query - $client_query - AND DATE(ticket_created_at) BETWEEN '$dtf' AND '$dtt' - AND (CONCAT(ticket_prefix,ticket_number) LIKE '%$q%' OR client_name LIKE '%$q%' OR ticket_subject LIKE '%$q%' OR ticket_status_name LIKE '%$q%' OR ticket_priority LIKE '%$q%' OR user_name LIKE '%$q%' OR contact_name LIKE '%$q%' OR asset_name LIKE '%$q%' OR vendor_name LIKE '%$q%' OR ticket_vendor_ticket_number LIKE '%q%') - $ticket_permission_snippet - $ordering_snippet" -); - -while ($row = mysqli_fetch_assoc($sql)) { - $id = $row['ticket_status_id']; - $ticket_order = $row['ticket_order']; - - // Loop over all items in $row to apply nullable_htmlentities only if the content is a string - foreach ($row as $key => $value) { - if (is_string($value)) { - $row[$key] = nullable_htmlentities($value); - } - } - - if (isset($statuses[$id])) { - $statuses[$id]->tickets[] = $row; - } -} - -// Convert associative array to indexed array for sorting -$kanban = array_values($statuses); - -?> - -
- -
-
name); ?>
-
- tickets as $item){ - if ($item['ticket_priority'] == "High") { - $ticket_priority_color = "danger"; - } elseif ($item['ticket_priority'] == "Medium") { - $ticket_priority_color = "warning"; - } else { - $ticket_priority_color = "info"; - } - ?> - -
- - - - - - - -
- - - -
- - -
- - -
- -
- - - -
- - -
-
- -
- - -"; -echo "const CONFIG_TICKET_MOVING_COLUMNS = " . json_encode($config_ticket_moving_columns) . ";"; -echo "const CONFIG_TICKET_ORDERING = " . json_encode($config_ticket_ordering) . ";"; -echo ""; -?> - - diff --git a/agent/tickets.php b/agent/tickets.php index af42ac47..da70cae0 100644 --- a/agent/tickets.php +++ b/agent/tickets.php @@ -247,8 +247,7 @@ $sql_categories_filter = mysqli_query( List - Kanban - Kanban (v2) + Kanban @@ -423,8 +422,6 @@ $sql_categories_filter = mysqli_query( if (isset($_GET["view"])) { if ($_GET["view"] == "list") { require_once "ticket_list.php"; - } elseif ($_GET["view"] == "kanban") { - require_once "ticket_kanban.php"; } elseif ($_GET["view"] == "kanbanv2") { require_once "ticket_kanban_v2.php"; }