This is a rewrite of (fidel's v1.6 mod), tested and working with v1.7.0. Note that the following patches should be applied at the TLD of your osTicket installation (using patch -p0 < ). The patch affects include/class.ticket.php only; note that my line numbers might differ from yours, and the order in which I apply this mod with others will most likely differ form the order in which you do.
NB - unlike fidel's mod, my version does not change the format of ay notifications by default, but creates the "thread" keyword for you to add into your e-mail templates, as desired.
The patch containing all changes:
--- include/class.ticket.php 2013-04-01 23.000000000 -0600
+++ include/class.ticket.php 2013-05-04 17.000000000 -0600
@@ -892,6 +965,20 @@
$comments = $comments?$comments:'Ticket assignment';
$assigner = $thisstaff?$thisstaff:'SYSTEM (Auto Assignment)';
+ foreach ($this->getThread()->getEntries() as $entry) {
+ switch ($entry) {
+ case 'M':
+ $thread .= "(Message) ".$entry."\n";
+ break;
+ case 'N':
+ $thread .= "(Note) ".$entry."\n";
+ break;
+ case 'R':
+ $thread .= "(Reply) ".$entry."\n";
+ break;
+ }
+ }
+
//Log an internal note - no alerts on the internal note.
$this->logNote('Ticket Assigned to '.$assignee->getName(), $comments, $assigner, false);
@@ -925,6 +1012,7 @@
$msg = $this->replaceVars($msg,
array('comments' => $comments,
+ 'thread' => $thread,
'assignee' => $assignee,
'assigner' => $assigner
));