HowTo: Remove message requirement when assigning tickets in OSTicket

Sometimes you just need to assign a ticket to another team member quickly and move on, but OSTicket insists on a leaving an assignment message. This is especially annoying when the reason for the assignment is blatantly obvious (such as a sales inquiry being assigned to a sales rep in the dept).

In OSTicket v1.9.7 open scp/tickets.php and locate the following block (around line 171):

 //Comments are not required on self-assignment (claim)
if($claim && !$_POST['assign_comments'])
$_POST['assign_comments'] = sprintf(__('Ticket claimed by %s'),$thisstaff->getName());
elseif(!$_POST['assign_comments'])
$errors['assign_comments'] = __('Assignment comments required');
elseif(strlen($_POST['assign_comments'])<5)
$errors['assign_comments'] = __('Comment too short');

If you want to remove the comment requirement altogether then either comment out or remove the last 4 lines like so:

//Comments are not required on self-assignment (claim)
if($claim && !$_POST['assign_comments'])
$_POST['assign_comments'] = sprintf(__('Ticket claimed by %s'),$thisstaff->getName());

If you just want to shorten the minimum requirement, then change the 2nd to last line.

From:

elseif(strlen($_POST['assign_comments'])<5)

to:

elseif(strlen($_POST['assign_comments'])<3)

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>