mirror of
https://github.com/itflow-org/itflow
synced 2026-03-16 02:34:50 +00:00
Remove Dup Edit Priority Logic from ticket post and fix priority from > to
This commit is contained in:
@@ -261,7 +261,7 @@ if (isset($_POST['edit_ticket_priority'])) {
|
|||||||
|
|
||||||
// Get ticket details
|
// Get ticket details
|
||||||
$sql = mysqli_query($mysqli, "SELECT
|
$sql = mysqli_query($mysqli, "SELECT
|
||||||
ticket_prefix, ticket_number ticket_priority, ticket_status_name, ticket_client_id
|
ticket_prefix, ticket_number, ticket_priority, ticket_status_name, ticket_client_id
|
||||||
FROM tickets
|
FROM tickets
|
||||||
LEFT JOIN ticket_statuses ON ticket_status = ticket_status_id
|
LEFT JOIN ticket_statuses ON ticket_status = ticket_status_id
|
||||||
WHERE ticket_id = $ticket_id"
|
WHERE ticket_id = $ticket_id"
|
||||||
@@ -283,7 +283,7 @@ if (isset($_POST['edit_ticket_priority'])) {
|
|||||||
|
|
||||||
customAction('ticket_update', $ticket_id);
|
customAction('ticket_update', $ticket_id);
|
||||||
|
|
||||||
$_SESSION['alert_message'] = "Priority updated <strong>$original_priority</strong> to <strong>$priority</strong>";
|
$_SESSION['alert_message'] = "Priority updated from <strong>$original_priority</strong> to <strong>$priority</strong>";
|
||||||
|
|
||||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||||
}
|
}
|
||||||
@@ -517,29 +517,6 @@ if (isset($_POST['edit_ticket_vendor'])) {
|
|||||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['edit_ticket_priority'])) {
|
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
|
||||||
|
|
||||||
$ticket_id = intval($_POST['ticket_id']);
|
|
||||||
$priority = sanitizeInput($_POST['priority']);
|
|
||||||
$client_id = intval($_POST['client_id']);
|
|
||||||
|
|
||||||
mysqli_query($mysqli, "UPDATE tickets SET ticket_priority = '$priority' WHERE ticket_id = $ticket_id");
|
|
||||||
|
|
||||||
//Logging
|
|
||||||
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Ticket', log_action = 'Modify', log_description = '$session_name edited ticket priority', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id, log_entity_id = $ticket_id");
|
|
||||||
|
|
||||||
// Custom action/notif handler
|
|
||||||
customAction('ticket_update', $ticket_id);
|
|
||||||
|
|
||||||
$_SESSION['alert_message'] = "Ticket priority updated";
|
|
||||||
|
|
||||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
|
||||||
|
|
||||||
customAction('ticket_update', $ticket_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_POST['assign_ticket'])) {
|
if (isset($_POST['assign_ticket'])) {
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user