Some more audit trail fixes
This commit is contained in:
parent
4ac430bc19
commit
d5589cc1c2
@ -71,7 +71,11 @@ if (hesk_dbNumRows($res) != 1) {
|
||||
$ticket = hesk_dbFetchAssoc($res);
|
||||
|
||||
/* Log that ticket is being moved */
|
||||
$history = sprintf($hesklang['thist1'], hesk_date(), $row['name'], $_SESSION['name'] . ' (' . $_SESSION['user'] . ')');
|
||||
//audit_moved_category
|
||||
mfh_insert_audit_trail_record($ticket['id'], 'TICKET', 'audit_moved_category', hesk_date(), array(
|
||||
0 => $_SESSION['name'] . ' (' . $_SESSION['user'] . ')',
|
||||
1 => $row['name']
|
||||
));
|
||||
|
||||
/* Is the ticket assigned to someone? If yes, check that the user has access to category or change to unassigned */
|
||||
$need_to_reassign = 0;
|
||||
@ -97,13 +101,15 @@ if ($need_to_reassign || !$ticket['owner']) {
|
||||
$autoassign_owner = hesk_autoAssignTicket($category);
|
||||
if ($autoassign_owner) {
|
||||
$ticket['owner'] = $autoassign_owner['id'];
|
||||
$history .= sprintf($hesklang['thist10'], hesk_date(), $autoassign_owner['name'] . ' (' . $autoassign_owner['user'] . ')');
|
||||
mfh_insert_audit_trail_record($ticket['id'], 'TICKET', 'audit_autoassigned', hesk_date(), array(
|
||||
0 => $autoassign_owner['name'] . ' (' . $autoassign_owner['user'] . ')'
|
||||
));
|
||||
} else {
|
||||
$ticket['owner'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` SET `category`='" . intval($category) . "', `owner`='" . intval($ticket['owner']) . "' , `history`=CONCAT(`history`,'" . hesk_dbEscape($history) . "') WHERE `trackid`='" . hesk_dbEscape($trackingID) . "'");
|
||||
hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` SET `category`='" . intval($category) . "', `owner`='" . intval($ticket['owner']) . "' WHERE `trackid`='" . hesk_dbEscape($trackingID) . "'");
|
||||
|
||||
$ticket['category'] = $category;
|
||||
|
||||
|
@ -2190,7 +2190,7 @@ $hesklang['permission_group'] = 'Permission Group';
|
||||
$hesklang['changing_permissions_will_reset_permission_group'] = 'Changing a user\'s categories / features will reset their permission group! Click "Discard Changes" to reset the user\'s categories / features.';
|
||||
|
||||
// --> Ticket audit trail
|
||||
$hesklang['audit_moved_category']='%s moved ticket to category %s'; // %s = new category, user making change
|
||||
$hesklang['audit_moved_category']='%s moved ticket to category %s'; // %s = new category, user making change, thist1
|
||||
$hesklang['audit_assigned']='%s assigned ticket to %s'; // %s = assigned user, user making change
|
||||
$hesklang['audit_assigned_self'] = '%s assigned ticket to themself';
|
||||
$hesklang['audit_unassigned'] = '%s unassigned ticket';
|
||||
@ -2203,7 +2203,7 @@ $hesklang['audit_unlocked']='%s unlocked ticket'; // thist6
|
||||
$hesklang['audit_created']='%s created ticket';
|
||||
$hesklang['audit_priority']='%s changed priority to %s'; // %s = date,new priority, user making change, thist8
|
||||
$hesklang['audit_status']='%s changed status to %s'; // %s = date, new status, user making change, thist9
|
||||
$hesklang['audit_autoassigned']='%s automatically assigned to ticket';
|
||||
$hesklang['audit_autoassigned']='%s automatically assigned to ticket'; //thist10
|
||||
$hesklang['audit_submitted_via_piping']='Ticket submitted via e-mail piping';
|
||||
$hesklang['audit_attachment_deleted']='%s deleted attachment %s'; // %s = date, deleted attachment, user making change
|
||||
$hesklang['audit_merged']='%s merged ticket with ticket %s'; // %s = date, merged ticket ID, user making change
|
||||
|
Loading…
x
Reference in New Issue
Block a user