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

Posts tagged department

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, email, osTicket, ticket, transfer

osTickets> Reports v5.0

Jun13
2011
Written by Scott Rowley


IT’S HERE! REPORTS 6.0 FOR OSTICKET VERSION 1.7

NOTE: If you are running any versions from 2.3 to 4.1 the “Replies per Staff” report is WRONG. I strongly suggest you upgrade to 4.2+

Ok, so after being on the osTicket forum since July 2009 I’ve noticed that one big MOD that everyone wants and never fully gets is reporting. The following is my stab at it.

This MOD has been implemented and tested on 1.6ST and 1.6RC5, please let me know if you run into any issues.

Note: For version 3.3+ you will need to create a scp/reports folder (and make sure its writable by Apache) and place the image (csv.png) into the scp/images folder.


Requirements: MySQL 5
pChart (for use with emailed reports) requires the GD and FreeType PHP extensions.

Note: Reports v2.4+ is compatible with Internet Explorer.

osTickets Reports osTickets Reports
osTickets Reports osTickets Reports
READ MORE »

Posted in MySQL, osTicket, PHP - Tagged date_add, date_format, date_sub, day, interval, mod, modification, month, MySQL, osTicket, php, report, reports, staff, year

osTicket> Allow clients to assign department

Oct26
2010
Written by Scott Rowley

This is the MOD for the much requested “Allow user to select department”…

Open $TICKETS_HOME/open.php
Remove

$_POST['deptId']=

(only this, not the rest of the line)

Open $TICKETS_HOME/include/client/open.inc.php
Before the Subject
insert the following:

<td align="left"><b>Department:</b></td>
<td>
<select name="deptId">
<option value="" selected >Select Department</option>
<?
$services= db_query('SELECT dept_id,dept_name FROM '.DEPT_TABLE.' ORDER BY dept_name');
while (list($deptId,$dept) = db_fetch_row($services)){
$selected = ($info['deptId']==$deptId)?'selected':''; ?>
<option value="<?=$deptId?>"<?=$selected?>><?=$dept?></option>
<?
}?>
</select>
&nbsp;<font class="error"><b>*</b>&nbsp;<?=$errors['deptId']?></font>
</td>
</tr>
Posted in osTicket - Tagged 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