this sounds like the problem i had in 1.6ST.
I discovered that if you assign the ticket at ticket creation time, then the person who is assigned does not receive an email advice.
I tracked this down to the fact that function setStaffId was returning a false when called from function assignStaff (both in class.ticket.php)
because of that false return, the email notification is bypassed.
my quick & inelegant solution was to change the return from setStaffId to always true by changing the return line to
return (db_query($sql) && db_affected_rows())?true;
if someone who knows php better that I do can have a look at it, they might come up with the correct solution. ;)
-------------
Another issue I had with the assigned user email is that the internal note is used in the body of the email sent to the person assigned, but not saved as a note as well.
I changed the end of the create_by_staff function from
//post create actions
if($var) { //Assign ticket to staff if any. (internal note as message)
$ticket->assignStaff($var,$var,(isset($var)));
}elseif($var){ //Not assigned...save optional note if any
$ticket->postNote('New Ticket',$var,false);
}else{ //Not assignment and no internal note - log activity
$ticket->logActivity('New Ticket by Staff','Ticket created by staff -'.$thisuser->getName());
}
}else{
$errors=$errors?$errors:'Unable to create the ticket. Correct the error(s) and try again';
}
return $ticket;
}
to
//post create actions
if($var) { //Assign ticket to staff if any. (internal note as message)
$ticket->assignStaff($var,$var,(isset($var)));
}else{ //Not assignment and no internal note - log activity
$ticket->logActivity('New Ticket by Staff','Ticket created by staff -'.$thisuser->getName());
}
if($var){ //save optional note if any
$ticket->postNote('',$var,false);
}
}else{
$errors=$errors?$errors:'Unable to create the ticket. Correct the error(s) and try again';
}
return $ticket;
}
this means that the internal note is used in the body of the email and saved as a note as well.
regards
A