mirror of https://github.com/itflow-org/itflow
feat. Updated Bulk Close Ticket to allow for a Private Note instead of public
This commit is contained in:
parent
5818c7fe18
commit
7975505823
|
|
@ -620,6 +620,12 @@ if (isset($_POST['bulk_close_tickets'])) {
|
|||
|
||||
// POST variables
|
||||
$details = mysqli_escape_string($mysqli, $_POST['bulk_details']);
|
||||
$private_note = intval($_POST['bulk_private_note']);
|
||||
if($private_note == 1){
|
||||
$ticket_reply_type = 'Internal';
|
||||
} else {
|
||||
$ticket_reply_type = 'Public';
|
||||
}
|
||||
|
||||
// Get a Ticket Count
|
||||
$ticket_count = count($_POST['ticket_ids']);
|
||||
|
|
@ -642,13 +648,13 @@ if (isset($_POST['bulk_close_tickets'])) {
|
|||
// Update ticket & insert reply
|
||||
mysqli_query($mysqli,"UPDATE tickets SET ticket_status = 'Closed' WHERE ticket_id = $ticket_id");
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO ticket_replies SET ticket_reply = '$details', ticket_reply_type = 'Internal', ticket_reply_time_worked = '00:01:00', ticket_reply_by = $session_user_id, ticket_reply_ticket_id = $ticket_id");
|
||||
mysqli_query($mysqli,"INSERT INTO ticket_replies SET ticket_reply = '$details', ticket_reply_type = '$ticket_reply_type', ticket_reply_time_worked = '00:01:00', ticket_reply_by = $session_user_id, ticket_reply_ticket_id = $ticket_id");
|
||||
|
||||
// Logging
|
||||
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Ticket', log_action = 'Close', log_description = '$session_name closed $ticket_prefix$ticket_number - $ticket_subject in a bulk action', 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");
|
||||
|
||||
// Client notification email
|
||||
if (!empty($config_smtp_host) && $config_ticket_client_general_notifications == 1) {
|
||||
if (!empty($config_smtp_host) && $config_ticket_client_general_notifications == 1 && $private_note == 0) {
|
||||
|
||||
// Get Contact details
|
||||
$ticket_sql = mysqli_query($mysqli,"SELECT contact_name, contact_email FROM tickets
|
||||
|
|
|
|||
|
|
@ -9,10 +9,20 @@
|
|||
</div>
|
||||
<div class="modal-body bg-white">
|
||||
|
||||
<input type="hidden" name="bulk_private_note" value="0">
|
||||
|
||||
<div class="form-group">
|
||||
<textarea class="form-control tinymce" rows="5" name="bulk_details" placeholder="Enter closing remarks"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="bulkPrivateCheckbox" name="bulk_private_note" value="1">
|
||||
<label class="custom-control-label" for="bulkPrivateCheckbox">Mark as a Private</label>
|
||||
<small class="form-text text-muted">If checked the contact and any watcher will not be informed</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer bg-white">
|
||||
<button type="submit" name="bulk_close_tickets" class="btn btn-primary text-bold"><i class="fas fa-gavel mr-2"></i>Close</button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue