mirror of
https://github.com/itflow-org/itflow
synced 2026-11-21 11:57:25 +00:00
Tickets: booked work has an end - the Schedule window has How long from 15 minutes to a day and an Agent picker that gives the ticket to someone else and takes it off the old agent's calendar; New Ticket's Schedule and a recurring ticket's Book the work for take a length; the calendar draws each booking at its length and dragging its bottom edge changes it after asking; the booking email, calendar file, ticket and guest page show the end; the double-booking warning lists the agent's tickets and timed events that overlap the booking instead of anything within two hours; database 3.8.2 adds tickets.ticket_schedule_end and recurring_tickets.recurring_ticket_schedule_minutes; 26.11.9 changelog entries
This commit is contained in:
30
admin/database_updates/3.8.2.php
Normal file
30
admin/database_updates/3.8.2.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* ITFlow - Database update to version 3.8.2 (from 3.8.1)
|
||||
* Included by admin/database_updates.php - do not access directly
|
||||
*
|
||||
* Booked work has an end (functions/ticket.php, ticketSetSchedule()):
|
||||
* tickets.ticket_schedule_end - when the booked work ends, in company time;
|
||||
* NULL is the usual length after the start (CALENDAR_TICKET_MINUTES)
|
||||
* recurring_tickets.recurring_ticket_schedule_minutes - how long each ticket a
|
||||
* recurring ticket books is booked for
|
||||
*
|
||||
* 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('tickets', 'ticket_schedule_end')) {
|
||||
mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_schedule_end` datetime DEFAULT NULL AFTER `ticket_schedule`");
|
||||
}
|
||||
|
||||
if (!$itflow_column('recurring_tickets', 'recurring_ticket_schedule_minutes')) {
|
||||
mysqli_query($mysqli, "ALTER TABLE `recurring_tickets` ADD `recurring_ticket_schedule_minutes` int(11) NOT NULL DEFAULT 60 AFTER `recurring_ticket_schedule_onsite`");
|
||||
}
|
||||
Reference in New Issue
Block a user