osTicket (Older articles)

This section is dedicated to articles pertaining to the open source trouble ticket system osTicket version 1.6ST and older. To view the articles please click on the links to the left that have now expanded because you clicked on this link.

Frequently Asked Questions (FAQ) about osTicket 1.7ST

This article was updated on 05 Aug 2013

Frequently many of the questions on the osTicket forums are duplicated. As much as I wish people would use the search feature it seems that most people would rather ask their question than actively look for the answer. So I’ve tried to compile a small list of things that people have either frequently asked, or I think they simply might want to do.

Q: How do I change the copyright at the bottom of the page?
Continue reading “Frequently Asked Questions (FAQ) about osTicket 1.7ST”

Agencies Dropdown and Admin UI for osTicket 1.7ST

These directions are for adding a database populated drop down field to tickets feature for osTicket v1.7ST. While it will be similar for any current version (RC through ST) it has only been tested on osTicket 1.7ST. Directions for modified osTicket v1.7ST will be similar but the line numbers may be different based on how you have modified your own implementation. These directions require that you already have a working implementation of osTickets v1.7ST. If you need these instructions for 1.6ST please click here.

Before you start following the directions on this or any other mod please be aware that you should always back up your site files and your database.

Step 1 – Modifying the Database

First we are going to create a table to store the information for the extra drop down field that we will be creating. For the purposes of this article we are creating the drop down box will be called “Agencies”. To use another name (such as “Program” or “Company” simply replace every occurrence in these directions of the word “agencies” with what you want to call it.

There are several ways to create the table (command line, phpmyadmin, MySQL Administrator, MySQL Workbench, etc.) so please feel free to use the way that you are most comfortable.

CREATE TABLE `ost_agencies` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `agency` varchar(255) NOT NULL,
  `addDate` datetime NOT NULL,
  `isenabled` tinyint(1) unsigned NOT NULL,
  `editor` varchar(25) default NULL,
  `upDate` datetime default NULL,
  `notes` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`),
  FULLTEXT KEY `agency` (`agency`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

note1: Please make sure that the ost_ prefix is what you are using for your setup. If you are using a different prefix make sure that you change this everywhere in the instructions.

note2: Please note that if you aren’t using “Agencies” please change all references to “Agencies” or “agency” to what you want it to be. There are 4 references in the above SQL query that should be changed. This same holds true for every instance in every step and the files distributed with this mod.

While we are here lets add one (1) entry into the table that you can change or edit later.

INSERT INTO `ost_agencies` (`id`,`agency`,`addDate`,`isenabled`,`editor`,`upDate`)
VALUES (1,'EMAILED TICKET','2010-09-01 11:23:47',1,'','0000-00-00 00:00:00');

Next we need to add a field to the ost_ticket table that will hold the Agency number.

ALTER TABLE `DATABASENAME`.`ost_ticket` ADD COLUMN `agency` INTEGER 
UNSIGNED NOT NULL DEFAULT 0 AFTER `updated`;

Step 2 – Modifying the files

Next we will be performing a number of edits to different files in the OSTicket directory tree.

Edit /include/client/open.inc.php
at line 45 insert the following:

<!-- start test -->
    <tr>
        <th nowrap >Agency:</th>
        <td>
            <select name=agency>
		<option value=0 selected>--select one--</option>
		<?
		  $agencies= db_query('SELECT id,agency FROM ost_agencies WHERE isenabled=1 ORDER BY agency');
		  while (list($id,$name) = db_fetch_row($agencies)){
 		    $ck=($info['id']==$id)?'selected':''; ?>
		    <option value="<?=$id?>" <?=$ck?>><?=$name?></option>
		  <?}?>
	    </select>
            <font class="error"><b>*</b> <?=$errors['source']?></font>
        </td>
    </tr>
<!-- end test -->

edit /include/client/view.inc.php
at line 36 add:

<tr>
  <th>&nbsp;</th>
  <td>&nbsp;</td>
</tr>

on line 52 add:

<tr>
  <th width="100">Agency:</th>
  <td>
  <?
    // need to take $ticket->getAgency and convert it into its name from the ost_agencies table
    $agencies= db_query('SELECT agency FROM '.TABLE_PREFIX.'agencies WHERE id='.$ticket->getAgency().'');
    $agency = db_fetch_row($agencies);
    ?>
    <?=Format::htmlchars($agency[0]);?>
  </td>
</tr>

edit /include/class.ticket.php
in function load($id=0)
at line 68 add:

.' LEFT JOIN ost_agencies agency ON (ticket.agency=agency.id) '

at line 178 after function getEmail() add:

    function getAgency() {
        return $this->ht['agency'];
    }

at line 1962 remove the ; frmo the end of the line, and add the following on the next line:

.' ,agency='.db_input($vars['agency'])

Since email doesn’t have a “agency” value we’re going to hard code one for now. You may want to create a default value in the database of “Emailed” and change this number to that.

edit /include/class.mailfetch.php
in function createTicket($mid)
at line 382 add:

$vars['agency']="45"; // set default agency for emails

line 298
added

  'agency' => $this->getAgency(),

line 1601
add on next line

  $fields['agency']    = array('type'=>'string',    'required'=>1, 'error'=>'Agency required');

line 1644
remove ; from end of line

line 1645
add

  .' ,agency='.db_input($vars['agency']);

line 1864
add

  $fields['agency']    = array('type'=>'string',    'required'=>1, 'error'=>'Agency required');

Lets add “Agencies” to the Admin panel under “Manage” -> “Agencies”

edit /include/class.nav.php
before “break;”
on line 209 add:

$subnav[]=array('desc'=>'Agencies','href'=>'agencies.php','iconclass'=>'alert-settings');

edit /scp/settings.php

on line 24
change

  'alerts' => 'Alerts and Notices Settings');

to

  'alerts' => 'Alerts and Notices Settings',

add next line:

  'agencies' => 'Agencies');

edit /include/staff/ticket-view.inc.php

at line 142 add:

<tr>
  <th>&nbsp;</th>
  <td>&nbsp;</td>
</tr>

at line 181 add:

<tr>
  <th width="100">Agency: </th>
  <td>
  <?
    // need to take $ticket->getAgency and convert it into its name from the ost_agencies table
    $agencies= db_query('SELECT agency FROM '.TABLE_PREFIX.'agencies WHERE id='.$ticket->getAgency().'');
    $agency = db_fetch_row($agencies); ?>
    <?php echo Format::htmlchars($agency[0]);?>
  </td>
</tr>

edit /include/staff/ticket-open.inc.php
at line 38 add:

<tr>
  <td width="160" class="required">Agency</td>
  <td>
    <select name=agency>
    <option value=0 selected>--select one--
    <?
    $agencies= db_query('SELECT id,agency FROM '.TABLE_PREFIX.'agencies ORDER BY agency');
    while (list($id,$name) = db_fetch_row($agencies)){
      $ck=($info['id']==$id)?'selected':''; ?>
      <option value="<?=$id?>" <?=$ck?>><?=$name?></option>
      <?
    }?>
    </select>
    <font class="error"><b>*</b> <?=$errors['source']?></font>
  </td>
</tr>

edit /include/staff/ticket-edit.inc.php
at line 40 (after the close tr from email)
add the following:

<tr>
  <td align="left">Agency:</td>
  <td>
            
    <select name="agency">	
    <?php
    $agencies= db_query('SELECT id,agency FROM '.TABLE_PREFIX.'agencies ORDER BY agency');
    while (list($id,$name) = db_fetch_row($agencies)){
      echo sprintf('<option value="%d" %s>%s</option>',
      $id, ($info['agency']==$id)?'selected="selected"':'',$name);
    }
    ?>
    </select>
  </td>
</tr>

Attached is the agencies-dropdown-admin-interface.zip which should contain all the necessary files that you should be able to simply drop in place. Instructions are included in the archive and here for those who have already modified their osTicket 1.7ST code files.

Attached File: osticket-mod-agencies-dropdown-admin-interface.zip

Translating osTicket into your native language. [Part 2]

Note: Peter announced that 1.8 will have language support.

Originally I was going to go over all the different files that you will need to translate things to fully translate your installation. However while writing the list (which I haven’t finished, but may finish and post later) someone else over at the osTicket forums posted another solution. One I may add that may be very close to the solution if not the solution released in version 1.8.

User Thane posted the following thread on the osTicket forums [MOD] Multilanguage Support which has also been posted on the projects github. You should check it out as its a fantastic solution. If you have modified your 1.7ST you will have to re-mod it after you install this, but its a lot faster and easier than trying to find every 2200(ish) string that needs translating.

Continue reading “Translating osTicket into your native language. [Part 2]”

BOOK: “The Ocean at the End of the Lane” by Neil Gaiman

My favorite author Neil Gaiman has a new book called “The Ocean at the End of the Lane” coming out in mid June (which is just over 9 weeks and 3 days as of this writing). Amazon has it available for pre-order now and I figured that I should mention this because I just pre-ordered my own copy. 🙂
The book description from Amazon as well as from Neil’s site reads: "A brilliantly imaginative and poignant fairy tale from the modern master of wonder and terror, The Ocean at the End of the Lane is Neil Gaiman’s first new novel for adults since his #1 New York Times bestseller Anansi Boys. This bewitching and harrowing tale of mystery and survival, and memory and magic, makes the impossible all too real…" (source)

Continue reading “BOOK: “The Ocean at the End of the Lane” by Neil Gaiman”

Add a client side open ticket list to osticket 1.7ST

This article was updated on 18 Apr 2013

One of the features that I would love to see integrated into osTicket is an open ticket listing for clients. I feel that it gives clients the ability to see what tickets are already open so as to cut down on duplicate tickets, and give them a better idea of how many tickets are ahead of them when they place their request. Now that osTicket 1.7ST has been released I have updated my previous mod for osTicket 1.6ST and re-released here for everyone to be able to use. I have included two ways to install it. If you have modified your installation already you can install manually following the directions. If you have not modified your installation I have included all the files that you can simply copy over your existing ones.
Continue reading “Add a client side open ticket list to osticket 1.7ST”

How to Upgrade from osTicket 1.7RC6 to 1.7ST

Now that osTicket 1.7ST is finally out people are of course going to want to upgrade. If you are running v1.6ST or are running any of the DPR or RC of 1.7 I highly recommend that you upgrade immediately. If you are running version 1.6ST please read: How to upgrade OSTicket from 1.6ST to 1.7RC4. If you were running rc6 please read on.

The upgrade from RC6 to ST is incredibly simple because there were no database structure changes between the two versions. Most of the file changes from RC6 to ST are actually in mail handling. Here’s the list of what to do. Normally I would tell you to always back up your database (and create a backup of your root web directory), and while it is best practice to do so I personally do not find it particularly necessary this time. [note: if you have modified your 1.7RC6 installation you should still back it up even if its just as a reminder to you how you modified it so as to re-create those modifications again.]

  • Download the 1.7.0 package
  • Extract the zip, and copy EVERYTHING into your current osticket folder.
  • Crack the can open, because your done.

Okay your not really done. For security reasons you should really go into your osTicket folder and delete setup. If you don’t and you go to your admin panel you will receive the annoying message of

"Please take a minute to delete setup/install directory (../setup/) for security reasons.

But wait! That’s too easy you say! Aren’t I supposed to go to osTicketInstall.ext/setup/upgrade.php? Well you can if you really want to, but you will see the red warning message saying:

Nothing to do! System already upgraded to 1.7.0 with no pending patches to apply.

Remember how at the beginning I mentioned that there are no database changes between 1.7RC6 and 1.7ST? There really are not any. Enjoy.

Followup: Unwritten (Graphic Novels) a recommendation

Unwritten Vol 1 CoverUnwritten Vol 1 Cover
Vol 1
Back in mid February I wrote about this amazing graphic novel series called Unwritten, well this morning I got an email from Amazon telling me that my order of Unwritten volumes 5 through 7 has finally shipped. Volume 7’s release date was yesterday so I have been waiting [not so] patiently since placing the order for it to get here. Now I know there the waiting is almost over, time to re-read the first four!
Continue reading “Followup: Unwritten (Graphic Novels) a recommendation”

Osticket 1.7ST (Desoto) released!

Osticket 1.7ST (Desoto) released!

Today marks the 1.7 Stable release of the much anticipated [by the community] widely used open source trouble ticket system known as osTicket. This is the first stable release in just over three years, and was preceded by 4 DPR (Developer Preview Releases), and 6 RC (release candidates).

Some of the new features include: canned auto-reply templates, PEAR package upgrades, email encoding, nested help topics, multi file uploads, new dashboard reports for activity and statistics, new database upgrading system, mouse over ticket previews, service level agreements, client side knowledge base, Email Filters, ticket export (PDF), re-worked osTicket API. The new version also sports a completely redesigned user interface on both the client and staff side which makes osTicket easier to customize.

Additionally this release heralds a new updated web page and forums to help continue to support the project and its users in the coming years. As of this writing there appears to be a small problem with the web page not serving at www, but the site is serving from osticket.com.

You can read the official announcement on the osTicket Forums, and you can download the new version here.