Logo
login: password:
register | forgot?

Knowledgebase

How can I add back the ticket id/mask to the subject line on my e-mail replies?


Cerberus Helpdesk 4.0 tries to avoid providing a configuration setting for every opinion, since this leads to a lot of needless complexity really quickly.

However, it's really easy to customize the subject line on outgoing e-mail since you have access to the full Cerb4 source code.

In the file /cerb4/api/app/Mail.php, around line 139 you will see the following code:
// Subject
if(!empty($properties['to'])) { // forward
$mail->setSubject((!empty($subject) ? $subject : $ticket->subject));
} else { // reply
$mail->setSubject('Re: ' . (!empty($subject) ? $subject : $ticket->subject));
}


Since you probably only want to prefix the subject with the ticket mask on replies (and not forwards), simply change the fifth line from:
$mail->setSubject('Re: ' . (!empty($subject) ? $subject : $ticket->subject));
to
$mail->setSubject('Re: [#' . $ticket->mask . ']: ' . (!empty($subject) ? $subject : $ticket->subject));


Want to prefix the ticket's group name as well?
$group = DAO_Group::getTeam($ticket->team_id);
$mail->setSubject(sprintf("Re: [%s #%s]: %s",
$group->name,
$ticket->mask
,
(!empty($subject) ? $subject : $ticket->subject)
));

In Cerb4, the parser will no longer look for any distinguishing characteristic from the subject line. You're free to change this to any format you want.

It's important to keep in mind that if you customize Cerberus Helpdesk you should be using Subversion to update to new releases. Updating from a zip/tarball snapshot will overwrite your changes.

Powered by Cerberus Helpdesk 4.0