• Home
  • Shell
    • Emacs
    • Perl
    • screen
    • sed
  • Ubuntu
    • VNC
  • Web Development
    • Javascript
    • Joomla
    • MySQL
    • osTicket
  • Windows
    • Gimp

Posts tagged transfer

osTicket> Alert Department on Ticket Transfer

Aug11
2011
Written by Scott Rowley

Ok this isn’t as nice as my normal MODs, its a bit clunky since its all statically written but it should do the trick nonetheless. This has only been tested right now on 1.6RC5, please let me know if you have success on 1.6ST with it and I’ll update this note. Cheers!

Purpose: When transferring a ticket to another department, the new department will receive an email alerting them to the assignment.

include/class.ticket.php
Inside the function transfer, under ‘global $cfg;’ Add the following:

$sql = 'SELECT email,dept_name FROM ost_email LEFT JOIN ost_department on ost_email.email_id=ost_department.email_id WHERE ost_department.dept_id='.$deptId;
print $sql;
$result = mysql_query($sql) or die(mysql_error());
while($row = mysql_fetch_array($result)){
echo "Department email is " .$row['email'];
$ticketNumber=$this->getId();
$to = $row['email'];
$deptName = $row['dept_name'];
$subject = "Ticket [#$ticketNumber] Assigned";
$message = "$deptName,\n\nTicket #$ticketNumber has been assigned to you.\n\nhttp://YOUR_DOMAIN.EXT/scp/tickets.php?id=$ticketNumber";
$headers = "From: FROM_EMAIL@YOUR_DOMAIN\r\n";
$headers .= "Reply-To: no-reply@YOUR_DOMAIN\r\n";
$headers .= "X-Mailer: PHP\" . phpversion() . \"\r\n";
mail($to, $subject, $message, $headers);
}

If there is enough desire for it I may some day add it into the template database for emails and such but right now this set in there statically was enough for me. As always let me know if you have any questions or concerns.

Posted in osTicket - Tagged alert, department, email, osTicket, ticket

osTicket> Transfer/Assign with no comment

Oct26
2010
Written by Scott Rowley

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.

Posted in osTicket - Tagged assign, comment, mod, modification, osTicket, ticket

Corrections? Questions? Comments?

Find an error?
Everything work out great for you?
Have some feedback?
Like to see something added to the article?

PLEASE leave us a comment after the article and let us know how we are doing, or if something needs corrected, improved or clarified.

Thank you!
- The Management

Advertisement

Sudo Bash
By Geeks - For Geeks

Back to Top