I find it useful to have the original message from the client sent in the email when assigning staff.
The mod below fetches the original message and makes that available in the assign staff alert template as %message.
Patch against 1.6.0 ST
diff --git a/include/class.ticket.php b/include/class.ticket.php
--- a/include/class.ticket.php
+++ b/include/class.ticket.php
@@ -557,10 +557,18 @@
' WHERE cfg_id='.db_input($cfg->getId()).' AND tpl_id='.db_input($tplId);
if(($resp=db_query($sql)) && db_num_rows($resp) && list($subj,$body)=db_fetch_row($resp)){
+ // Load the first message from the user
+ $firstMessage='';
+ $sql='SELECT message FROM '.TICKET_MESSAGE_TABLE.
+ ' WHERE ticket_id='.db_input($this->getId()).' LIMIT 1';
+ if(($resp=db_query($sql)) && db_num_rows($resp)){
+ list($firstMessage)=db_fetch_row($resp);
+ }
+
$body=$this->replaceTemplateVars($body);
$subj=$this->replaceTemplateVars($subj);
$body = str_replace('%note',$message,$body);
- $body = str_replace("%message", $message,$body); //Previous versions used message.
+ $body = str_replace("%message", $firstMessage,$body); // Now %message refers to the first message from the client.
$body = str_replace("%assignee", $staff->getName(),$body);
$body = str_replace("%assigner", ($thisuser)?$thisuser->getName():'System',$body);