mirror of
https://github.com/itflow-org/itflow
synced 2026-11-23 12:57:24 +00:00
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:
35
admin/database_updates/3.8.9.php
Normal file
35
admin/database_updates/3.8.9.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* ITFlow - Database update to version 3.8.9 (from 3.8.8)
|
||||
* Included by admin/database_updates.php - do not access directly
|
||||
*
|
||||
* Project tickets kept apart from the service desk (functions/project_tickets.php):
|
||||
* settings.config_project_tickets_apart - 1 keeps a project's tickets off the
|
||||
* Tickets list's usual views, the dashboard's counts and the Dispatch queue,
|
||||
* with no SLA; 0 (the default) as before.
|
||||
* settings.config_project_ticket_color - their bookings' colour on the calendar;
|
||||
* NULL is purple.
|
||||
* tickets.ticket_sla_from - when the ticket's SLA targets count from, when it
|
||||
* isn't when it was made: the moment it left a project. NULL from creation.
|
||||
*
|
||||
* Re-runnable: each column is added only where it isn't there yet.
|
||||
*/
|
||||
|
||||
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
|
||||
|
||||
$itflow_column = function ($table, $column) use ($mysqli) {
|
||||
$result = mysqli_query($mysqli, "SELECT 1 FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = '$table' AND COLUMN_NAME = '$column' LIMIT 1");
|
||||
return $result && mysqli_num_rows($result) > 0;
|
||||
};
|
||||
|
||||
if (!$itflow_column('settings', 'config_project_tickets_apart')) {
|
||||
mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_project_tickets_apart` tinyint(1) NOT NULL DEFAULT 0 AFTER `config_project_next_number`");
|
||||
}
|
||||
if (!$itflow_column('settings', 'config_project_ticket_color')) {
|
||||
mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_project_ticket_color` varchar(20) DEFAULT NULL AFTER `config_project_tickets_apart`");
|
||||
}
|
||||
if (!$itflow_column('tickets', 'ticket_sla_from')) {
|
||||
mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_sla_from` datetime DEFAULT NULL AFTER `ticket_sla_id`");
|
||||
}
|
||||
Reference in New Issue
Block a user