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:
johnnyq
2026-11-17 20:50:59 -05:00
parent 1c4c8be8de
commit 512ac75c73
18 changed files with 350 additions and 76 deletions

View File

@@ -179,7 +179,7 @@ if (isset($_GET['ticket_calendar'])) {
exit('Nothing is booked on this ticket.');
}
$ics = ticketScheduleIcs(ticketScheduleRow($row['ticket_id']), $row['ticket_schedule']);
$ics = ticketScheduleIcs(ticketScheduleRow($row['ticket_id']), $row['ticket_schedule'], $row['ticket_schedule_end'] ?? null);
header('Content-Type: text/calendar; charset=utf-8');
header('Content-Disposition: attachment; filename="' . preg_replace('/[^A-Za-z0-9_-]/', '', ticketReference($row)) . '.ics"');
header('Content-Length: ' . strlen($ics));

View File

@@ -52,7 +52,7 @@ $found = ticketByGuestKey($_GET['ticket_id'] ?? 0, $_GET['url_key'] ?? '');
$ticket_id = $found ? intval($found['ticket_id']) : 0;
$ticket = $ticket_id ? mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT " . portalTicketColumnsSql() . ", tickets.ticket_details, tickets.ticket_feedback, tickets.ticket_url_key,
tickets.ticket_client_id, tickets.ticket_assigned_to, tickets.ticket_schedule, tickets.ticket_onsite, tickets.ticket_first_response_at, tickets.ticket_response_due_at,
tickets.ticket_client_id, tickets.ticket_assigned_to, tickets.ticket_schedule, " . (ticketScheduleEndReady() ? 'tickets.ticket_schedule_end' : 'NULL AS ticket_schedule_end') . ", tickets.ticket_onsite, tickets.ticket_first_response_at, tickets.ticket_response_due_at,
user_name, user_avatar, category_name, contact_name, contact_photo, asset_name, asset_type,
location_name, location_address, location_city, location_state, location_zip
FROM tickets
@@ -219,7 +219,7 @@ $urgent = $open && $company_phone !== '' && in_array($ticket['ticket_priority'],
<li class="itflow-portal-todo itflow-portal-todo-wrap">
<span class="itflow-portal-todo-icon is-info"><i class="fas fa-calendar-check"></i></span>
<span class="itflow-portal-todo-main">
<div>Booked for <?= escapeHtml(date('l, F j', strtotime($ticket['ticket_schedule'])) . ' at ' . date($config_time_format, strtotime($ticket['ticket_schedule']))) ?></div>
<div>Booked for <?= escapeHtml(date('l, F j', strtotime($ticket['ticket_schedule'])) . ', ' . date($config_time_format, strtotime($ticket['ticket_schedule'])) . ' - ' . date($config_time_format, strtotime(ticketScheduleEnd($ticket['ticket_schedule'], $ticket['ticket_schedule_end'])))) ?></div>
<div><?= !empty($ticket['ticket_onsite']) ? 'Onsite' . ($booked_where !== '' ? ' at ' . escapeHtml($booked_where) : '') : 'Remote - we will connect to you' ?></div>
</span>
<a class="btn btn-sm btn-light border" href="guest_post.php?ticket_calendar=<?= $ticket_id ?>&amp;url_key=<?= rawurlencode($url_key) ?>"><i class="far fa-calendar-plus me-1"></i>Add to calendar</a>