This is for Version: 2.4.2 from 30th December 2012.
ISSUE: I wanted to have an option to notify all my support staff when a ticket was responded to. All my users work the same ticket pool, but once a ticket was assigned, they did not receive replies on tickets just to keep an eye out, unless they reviewed the ticket list and opened it. Also, the assigned users wanted a copy of the ticket reply.
SOLUTION: I added a check box to the ticket reply window to give them the option to copy the support team as a whole. When they reply, it sends an email to a distribution list.
Steps:
Open admin_ticket.php
Around line 1448 ( I added my option below the priority change option) AFTER
Code: Select all
<label><input type="checkbox" name="set_priority" value="1" /> <?php echo $hesklang['change_priority']; ?> </label>
<select name="priority">
<?php echo implode('',$options); ?>
</select><br />
Code: Select all
<label><input type="checkbox" name="notify" value="1" checked="checked" /> <?php echo $hesklang['notify_all']; ?></label>
</select><br />
Open and edit admin_reply_ticket.php
Around line 258 AFTER
Code: Select all
/* Update number of replies in the users table */
$sql = "UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` SET `replies`=`replies`+1 WHERE `id`=".hesk_dbEscape($_SESSION['id'])." LIMIT 1";
hesk_dbQuery($sql);
/* --> Prepare reply message */
$ticket['subject'] = hesk_msgToPlain($ticket['subject'], 1, 0);
$ticket['message'] = hesk_msgToPlain($message, 1);
/* Notify the customer */
hesk_notifyCustomer('new_reply_by_staff');
Code: Select all
if ( ! empty($_POST['notify']) )
{
/* --> Prepare reply message */
$ticket['subject'] = hesk_msgToPlain($ticket['subject'], 1, 0);
$ticket['message'] = hesk_msgToPlain($message, 1);
$notify2='support@yourdomain.com';
$msg = hesk_getEmailMessage('new_reply_by_otherstaff',$ticket,1);
hesk_mail($notify2,$hesklang['new_reply_by_otherstaff'],$msg);
}
else
{
$notify = "";
}
Code: Select all
Ticket Topic: %%SUBJECT%%
----------------------------------------
Someone has updated Ticket %%TRACK_ID%% as follows:
%%MESSAGE%%
----------------------------------------
Access this ticket:
%%TRACK_URL%%
Code: Select all
$hesklang['new_reply_by_otherstaff'] = 'Support Staff Updated a Ticket';
$hesklang['notify_all']='Notify ISD of reply';