mirror of
https://github.com/itflow-org/itflow
synced 2026-08-05 07:07:14 +00:00
Add Urgent Priority, move Per Client SLA Settings to notes tab in client add / edit modal remove unnessesary sla admin setting for client overide
This commit is contained in:
@@ -1107,7 +1107,9 @@ if (isset($_GET['asset_id'])) {
|
||||
}
|
||||
$ticket_closed_at = escapeHtml($row['ticket_closed_at']);
|
||||
|
||||
if ($ticket_priority == "High") {
|
||||
if ($ticket_priority == "Urgent") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-dark'>$ticket_priority</span>";
|
||||
} elseif ($ticket_priority == "High") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-danger'>$ticket_priority</span>";
|
||||
} elseif ($ticket_priority == "Medium") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-warning'>$ticket_priority</span>";
|
||||
|
||||
@@ -847,7 +847,9 @@ if (isset($_GET['contact_id'])) {
|
||||
}
|
||||
$ticket_closed_at = escapeHtml($row['ticket_closed_at']);
|
||||
|
||||
if ($ticket_priority == "High") {
|
||||
if ($ticket_priority == "Urgent") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-dark'>$ticket_priority</span>";
|
||||
} elseif ($ticket_priority == "High") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-danger'>$ticket_priority</span>";
|
||||
} elseif ($ticket_priority == "Medium") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-warning'>$ticket_priority</span>";
|
||||
|
||||
@@ -770,7 +770,7 @@ if ($user_config_dashboard_technical_enable == 1) {
|
||||
$has_client = "";
|
||||
}
|
||||
|
||||
$ticket_priority_color = $ticket_priority == "High" ? "danger" : ($ticket_priority == "Medium" ? "warning" : "info");
|
||||
$ticket_priority_color = $ticket_priority == "Urgent" ? "dark" : ($ticket_priority == "High" ? "danger" : ($ticket_priority == "Medium" ? "warning" : "info"));
|
||||
$contact_display = empty($contact_name) ? "-" : "<a href='contact.php?client_id=$client_id&contact_id=$contact_id'>$contact_name</a>";
|
||||
?>
|
||||
<tr class="<?= empty($ticket_updated_at) ? 'text-bold' : '' ?>">
|
||||
|
||||
@@ -635,7 +635,9 @@ ob_start();
|
||||
}
|
||||
$ticket_closed_at = escapeHtml($row['ticket_closed_at']);
|
||||
|
||||
if ($ticket_priority == "High") {
|
||||
if ($ticket_priority == "Urgent") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-dark'>$ticket_priority</span>";
|
||||
} elseif ($ticket_priority == "High") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-danger'>$ticket_priority</span>";
|
||||
} elseif ($ticket_priority == "Medium") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-warning'>$ticket_priority</span>";
|
||||
|
||||
@@ -50,6 +50,7 @@ ob_start();
|
||||
<option>Low</option>
|
||||
<option>Medium</option>
|
||||
<option>High</option>
|
||||
<option>Urgent</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -159,34 +159,6 @@ ob_start();
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// Ticket SLA assignments - only offered when active SLAs exist
|
||||
$sla_options = [];
|
||||
$sla_options_sql = mysqli_query($mysqli, "SELECT sla_id, sla_name FROM slas WHERE sla_archived_at IS NULL ORDER BY sla_name ASC");
|
||||
while ($sla_option_row = mysqli_fetch_assoc($sla_options_sql)) {
|
||||
$sla_options[intval($sla_option_row['sla_id'])] = $sla_option_row['sla_name'];
|
||||
}
|
||||
if ($config_module_enable_ticketing && !empty($sla_options)) { ?>
|
||||
<div class="form-group">
|
||||
<label>Ticket SLAs</label>
|
||||
<div class="form-row">
|
||||
<?php foreach (['Low', 'Medium', 'High'] as $sla_priority) { ?>
|
||||
<div class="col-4">
|
||||
<small class="text-secondary"><?= $sla_priority ?></small>
|
||||
<select class="form-control" name="client_sla_<?= strtolower($sla_priority) ?>">
|
||||
<option value="default">Default</option>
|
||||
<option value="0">None</option>
|
||||
<?php foreach ($sla_options as $sla_option_id => $sla_option_name) { ?>
|
||||
<option value="<?= $sla_option_id ?>"><?= escapeHtml($sla_option_name) ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<small class="text-muted">Default follows the global SLA assignment for each priority.</small>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="pills-location">
|
||||
@@ -391,6 +363,7 @@ ob_start();
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
@@ -399,6 +372,34 @@ ob_start();
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" rows="10" name="notes" placeholder="Enter some notes"></textarea>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// Ticket SLA assignments - only offered when active SLAs exist
|
||||
$sla_options = [];
|
||||
$sla_options_sql = mysqli_query($mysqli, "SELECT sla_id, sla_name FROM slas WHERE sla_archived_at IS NULL ORDER BY sla_name ASC");
|
||||
while ($sla_option_row = mysqli_fetch_assoc($sla_options_sql)) {
|
||||
$sla_options[intval($sla_option_row['sla_id'])] = $sla_option_row['sla_name'];
|
||||
}
|
||||
if ($config_module_enable_ticketing && !empty($sla_options)) { ?>
|
||||
<div class="form-group">
|
||||
<label>Ticket SLAs</label>
|
||||
<div class="form-row">
|
||||
<?php foreach (['Low', 'Medium', 'High', 'Urgent'] as $sla_priority) { ?>
|
||||
<div class="col-3">
|
||||
<small class="text-secondary"><?= $sla_priority ?></small>
|
||||
<select class="form-control" name="client_sla_<?= strtolower($sla_priority) ?>">
|
||||
<option value="default">Default</option>
|
||||
<option value="0">None</option>
|
||||
<?php foreach ($sla_options as $sla_option_id => $sla_option_name) { ?>
|
||||
<option value="<?= $sla_option_id ?>"><?= escapeHtml($sla_option_name) ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<small class="text-muted">Default follows the global SLA assignment for each priority.</small>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -46,6 +46,7 @@ ob_start();
|
||||
<option>Low</option>
|
||||
<option>Medium</option>
|
||||
<option>High</option>
|
||||
<option>Urgent</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -193,34 +193,6 @@ ob_start();
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// Ticket SLA assignments - only offered when active SLAs exist
|
||||
$sla_options = [];
|
||||
$sla_options_sql = mysqli_query($mysqli, "SELECT sla_id, sla_name FROM slas WHERE sla_archived_at IS NULL ORDER BY sla_name ASC");
|
||||
while ($sla_option_row = mysqli_fetch_assoc($sla_options_sql)) {
|
||||
$sla_options[intval($sla_option_row['sla_id'])] = $sla_option_row['sla_name'];
|
||||
}
|
||||
if ($config_module_enable_ticketing && !empty($sla_options)) { ?>
|
||||
<div class="form-group">
|
||||
<label>Ticket SLAs</label>
|
||||
<div class="form-row">
|
||||
<?php foreach (['Low', 'Medium', 'High'] as $sla_priority) { $sla_current = $client_sla_assignments[$sla_priority] ?? 'default'; ?>
|
||||
<div class="col-4">
|
||||
<small class="text-secondary"><?= $sla_priority ?></small>
|
||||
<select class="form-control" name="client_sla_<?= strtolower($sla_priority) ?>">
|
||||
<option value="default" <?php if ($sla_current === 'default') { echo "selected"; } ?>>Default</option>
|
||||
<option value="0" <?php if ($sla_current === 0) { echo "selected"; } ?>>None</option>
|
||||
<?php foreach ($sla_options as $sla_option_id => $sla_option_name) { ?>
|
||||
<option value="<?= $sla_option_id ?>" <?php if ($sla_current === $sla_option_id) { echo "selected"; } ?>><?= escapeHtml($sla_option_name) ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<small class="text-muted">Default follows the global SLA assignment for each priority.</small>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ($config_module_enable_accounting) { ?>
|
||||
@@ -269,6 +241,7 @@ ob_start();
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
@@ -279,6 +252,34 @@ ob_start();
|
||||
<textarea class="form-control" rows="10" placeholder="Enter some notes" name="notes"><?= $client_notes ?></textarea>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// Ticket SLA assignments - only offered when active SLAs exist
|
||||
$sla_options = [];
|
||||
$sla_options_sql = mysqli_query($mysqli, "SELECT sla_id, sla_name FROM slas WHERE sla_archived_at IS NULL ORDER BY sla_name ASC");
|
||||
while ($sla_option_row = mysqli_fetch_assoc($sla_options_sql)) {
|
||||
$sla_options[intval($sla_option_row['sla_id'])] = $sla_option_row['sla_name'];
|
||||
}
|
||||
if ($config_module_enable_ticketing && !empty($sla_options)) { ?>
|
||||
<div class="form-group">
|
||||
<label>Ticket SLAs</label>
|
||||
<div class="form-row">
|
||||
<?php foreach (['Low', 'Medium', 'High', 'Urgent'] as $sla_priority) { $sla_current = $client_sla_assignments[$sla_priority] ?? 'default'; ?>
|
||||
<div class="col-3">
|
||||
<small class="text-secondary"><?= $sla_priority ?></small>
|
||||
<select class="form-control" name="client_sla_<?= strtolower($sla_priority) ?>">
|
||||
<option value="default" <?php if ($sla_current === 'default') { echo "selected"; } ?>>Default</option>
|
||||
<option value="0" <?php if ($sla_current === 0) { echo "selected"; } ?>>None</option>
|
||||
<?php foreach ($sla_options as $sla_option_id => $sla_option_name) { ?>
|
||||
<option value="<?= $sla_option_id ?>" <?php if ($sla_current === $sla_option_id) { echo "selected"; } ?>><?= escapeHtml($sla_option_name) ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<small class="text-muted">Default follows the global SLA assignment for each priority.</small>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -629,7 +629,9 @@ ob_start();
|
||||
$ticket_updated_at_display = $ticket_updated_at;
|
||||
}
|
||||
|
||||
if ($ticket_priority == "High") {
|
||||
if ($ticket_priority == "Urgent") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-dark'>$ticket_priority</span>";
|
||||
} elseif ($ticket_priority == "High") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-danger'>$ticket_priority</span>";
|
||||
} elseif ($ticket_priority == "Medium") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-warning'>$ticket_priority</span>";
|
||||
|
||||
@@ -111,6 +111,7 @@ ob_start();
|
||||
<option>Low</option>
|
||||
<option>Medium</option>
|
||||
<option>High</option>
|
||||
<option>Urgent</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -33,6 +33,7 @@ ob_start();
|
||||
<option>Low</option>
|
||||
<option>Medium</option>
|
||||
<option>High</option>
|
||||
<option>Urgent</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -95,6 +95,7 @@ ob_start();
|
||||
<option <?php if ($recurring_ticket_priority == "Low") { echo "selected"; } ?> >Low</option>
|
||||
<option <?php if ($recurring_ticket_priority == "Medium") { echo "selected"; } ?> >Medium</option>
|
||||
<option <?php if ($recurring_ticket_priority == "High") { echo "selected"; } ?> >High</option>
|
||||
<option <?php if ($recurring_ticket_priority == "Urgent") { echo "selected"; } ?> >Urgent</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -149,6 +149,7 @@ ob_start();
|
||||
<option>Low</option>
|
||||
<option>Medium</option>
|
||||
<option>High</option>
|
||||
<option>Urgent</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -161,6 +161,7 @@ ob_start();
|
||||
<option>Low</option>
|
||||
<option>Medium</option>
|
||||
<option>High</option>
|
||||
<option>Urgent</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -33,6 +33,7 @@ ob_start();
|
||||
<option>Low</option>
|
||||
<option>Medium</option>
|
||||
<option>High</option>
|
||||
<option>Urgent</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -111,6 +111,7 @@ ob_start();
|
||||
<option <?php if ($ticket_priority == 'Low') { echo "selected"; } ?> >Low</option>
|
||||
<option <?php if ($ticket_priority == 'Medium') { echo "selected"; } ?> >Medium</option>
|
||||
<option <?php if ($ticket_priority == 'High') { echo "selected"; } ?> >High</option>
|
||||
<option <?php if ($ticket_priority == 'Urgent') { echo "selected"; } ?> >Urgent</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -49,6 +49,7 @@ ob_start();
|
||||
<option <?php if ($ticket_priority == 'Low') { echo "selected"; } ?> >Low</option>
|
||||
<option <?php if ($ticket_priority == 'Medium') { echo "selected"; } ?> >Medium</option>
|
||||
<option <?php if ($ticket_priority == 'High') { echo "selected"; } ?> >High</option>
|
||||
<option <?php if ($ticket_priority == 'Urgent') { echo "selected"; } ?> >Urgent</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -246,7 +246,7 @@ if (isset($_POST['add_client'])) {
|
||||
|
||||
// Ticket SLA assignments (fields only rendered when active SLAs exist)
|
||||
if (isset($_POST['client_sla_low'])) {
|
||||
foreach (['Low', 'Medium', 'High'] as $sla_priority) {
|
||||
foreach (['Low', 'Medium', 'High', 'Urgent'] as $sla_priority) {
|
||||
$sla_value = strval($_POST['client_sla_' . strtolower($sla_priority)] ?? 'default');
|
||||
if ($sla_value !== 'default') {
|
||||
$client_sla_id = intval($sla_value);
|
||||
@@ -345,7 +345,7 @@ if (isset($_POST['edit_client'])) {
|
||||
}
|
||||
|
||||
$sla_assignments_changed = false;
|
||||
foreach (['Low', 'Medium', 'High'] as $sla_priority) {
|
||||
foreach (['Low', 'Medium', 'High', 'Urgent'] as $sla_priority) {
|
||||
$sla_value = strval($_POST['client_sla_' . strtolower($sla_priority)] ?? 'default');
|
||||
$sla_current = $current_sla_assignments[$sla_priority] ?? 'default';
|
||||
if ($sla_value === $sla_current) {
|
||||
|
||||
@@ -413,7 +413,9 @@ if (isset($_GET['project_id'])) {
|
||||
}
|
||||
$ticket_closed_at = escapeHtml($row['ticket_closed_at']);
|
||||
|
||||
if ($ticket_priority == "High") {
|
||||
if ($ticket_priority == "Urgent") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-dark'>$ticket_priority</span>";
|
||||
} elseif ($ticket_priority == "High") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-danger'>$ticket_priority</span>";
|
||||
} elseif ($ticket_priority == "Medium") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-warning'>$ticket_priority</span>";
|
||||
|
||||
@@ -68,6 +68,7 @@ $sql = mysqli_query(
|
||||
CASE
|
||||
WHEN '$sort' = 'recurring_ticket_priority' THEN
|
||||
CASE recurring_ticket_priority
|
||||
WHEN 'Urgent' THEN 0
|
||||
WHEN 'High' THEN 1
|
||||
WHEN 'Medium' THEN 2
|
||||
WHEN 'Low' THEN 3
|
||||
|
||||
@@ -86,7 +86,9 @@ if (isset($_GET['ticket_id'])) {
|
||||
}
|
||||
|
||||
//Set Ticket Badge Color based of priority
|
||||
if ($ticket_priority == "High") {
|
||||
if ($ticket_priority == "Urgent") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-pill badge-dark'>$ticket_priority</span>";
|
||||
} elseif ($ticket_priority == "High") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-pill badge-danger'>$ticket_priority</span>";
|
||||
} elseif ($ticket_priority == "Medium") {
|
||||
$ticket_priority_display = "<span class='p-2 badge badge-pill badge-warning'>$ticket_priority</span>";
|
||||
|
||||
@@ -24,6 +24,7 @@ while ($row = mysqli_fetch_assoc($status_sql)) {
|
||||
|
||||
$ordering_snippet = "ORDER BY
|
||||
CASE
|
||||
WHEN ticket_priority = 'Urgent' THEN 0
|
||||
WHEN ticket_priority = 'High' THEN 1
|
||||
WHEN ticket_priority = 'Medium' THEN 2
|
||||
WHEN ticket_priority = 'Low' THEN 3
|
||||
@@ -98,7 +99,9 @@ $kanban = array_values($statuses);
|
||||
|
||||
<?php foreach ($column['tickets'] as $item) {
|
||||
|
||||
if ($item['ticket_priority'] == "High") {
|
||||
if ($item['ticket_priority'] == "Urgent") {
|
||||
$ticket_priority_color = "dark";
|
||||
} elseif ($item['ticket_priority'] == "High") {
|
||||
$ticket_priority_color = "danger";
|
||||
} elseif ($item['ticket_priority'] == "Medium") {
|
||||
$ticket_priority_color = "warning";
|
||||
|
||||
@@ -115,7 +115,9 @@
|
||||
$has_client = "";
|
||||
}
|
||||
|
||||
if ($ticket_priority == "High") {
|
||||
if ($ticket_priority == "Urgent") {
|
||||
$ticket_priority_color = "dark";
|
||||
} elseif ($ticket_priority == "High") {
|
||||
$ticket_priority_color = "danger";
|
||||
} elseif ($ticket_priority == "Medium") {
|
||||
$ticket_priority_color = "warning";
|
||||
|
||||
@@ -117,6 +117,7 @@ $query =
|
||||
CASE
|
||||
WHEN '$sort' = 'ticket_priority' THEN
|
||||
CASE ticket_priority
|
||||
WHEN 'Urgent' THEN 0
|
||||
WHEN 'High' THEN 1
|
||||
WHEN 'Medium' THEN 2
|
||||
WHEN 'Low' THEN 3
|
||||
|
||||
Reference in New Issue
Block a user