Today we are going to show you how to get rid of the annoying requirement of adding a comment to a ticket transfer or assignment…
For the “Assign to Staff” section you can comment out the following line from
scp/tickets.php
$fields['assign_message'] = array('type'=>'text', 'required'=>1, 'error'=>'Message required');
like so:
//$fields['assign_message'] = array('type'=>'text', 'required'=>1, 'error'=>'Message required');
For assign to department you’ll need:
scp/tickets.php
$fields['message'] = array('type'=>'text', 'required'=>1, 'error'=>'Note/Message required');
Like so:
//$fields['message'] = array('type'=>'text', 'required'=>1, 'error'=>'Note/Message required');
Then if you want to let people know that it is not required you can go into
include/staff/viewticket.inc.php
Find (for assign to staff):
<span >Comments/message for assignee. (<i>Saved as internal note</i>) <font class="error"> *<?=$errors['assign_message']?></font></span>
And remove:
<font class="error"> *<?=$errors['assign_message']?></font>
Find (for department transfer):
<span >Comments/Reasons for the transfer. (<i>Internal note</i>) <font class="error"> *<?=$errors['message']?></font></span>
Remove:
<font class="error"> *<?=$errors['message']?></font>
Now comments are no longer required to be present before assigning or transferring a ticket — and users are aware that it is not required.
I’ve do this changes:
//Comments are not required on self-assignment (claim)
if($claim && !$_POST[‘assign_comments’])
$_POST[‘assign_comments’] = ‘Ticket claimed by ‘.$thisstaff->getName();
elseif(!$_POST[‘assign_comments’])
$_POST[‘assign_comments’] = ‘Ticket assigned by ‘.$thisstaff->getName();
// $errors[‘assign_comments’] = ‘Assignment comments required’;
//elseif(strlen($_POST[‘assign_comments’])<5)
// $errors['assign_comments'] = 'Comment too short';