mirror of
https://github.com/itflow-org/itflow
synced 2026-08-28 10:25:12 +00:00
Roll SLA email targets up to business days, escape priority, validate priority in the tickets API
This commit is contained in:
@@ -27,7 +27,15 @@ if (isset($_POST['ticket_subject'])) {
|
||||
}
|
||||
|
||||
|
||||
if (isset($_POST['ticket_priority'])) {
|
||||
// Priority has to be one of the four the rest of the app is built around:
|
||||
// sla_assignments are keyed on these exact strings, and the ticket list and
|
||||
// kanban both fall through to the Low styling for anything else, so an
|
||||
// unrecognised value silently reads as the lowest priority everywhere.
|
||||
// Anything else is normalised away rather than rejected, matching how this
|
||||
// model already handles a non-integer client_id.
|
||||
$allowed_priorities = ['Low', 'Medium', 'High', 'Urgent'];
|
||||
|
||||
if (isset($_POST['ticket_priority']) && in_array($_POST['ticket_priority'], $allowed_priorities, true)) {
|
||||
$priority = escapeSql($_POST['ticket_priority']);
|
||||
} elseif ($ticket_row) {
|
||||
$priority = mysqli_real_escape_string($mysqli, $ticket_row['ticket_priority']);
|
||||
|
||||
Reference in New Issue
Block a user