Menu Close

Add a client side open ticket list to osTicket 1.8.1

This article replaces the old one from:
https://tmib.net/add-client-side-open-ticket-list-osticket-18

With the release of osTicket 1.8.1 I thought that it was time to update this article which adds a client side open ticket list, adds the ability to control it its on/off, and how many tickets it should display in the admin panel. 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. This mod is will be added to github and a pull request to integrate it made.  It was originally written for osTicket 1.6ST, updated for 1.7 as well as 1.8. 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.

With the release of osTicket 1.8.1ST I thought that it was time to revisit this article.  This article describes a mod which adds the following functionality to osTicket:

  • a "safe" client side open ticket list [reduced information]
  • Toggle display on/off in admin panel -> tickets
  • Configure how many open tickets to display in admin panel -> tickets (default 10)
  • more intelligent display of open tickets and faqs (built in)
  • aesthetic css formating for the list.
  • Utilizes osTicket db functions for communication with the DB.
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.

It was originally written for osTicket 1.6ST, was later updated for 1.7 as well as 1.8. 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.

1. Save the display_open_topics.php into your base osTicket folder. Open it and edit the lines 16 through 18 to match your setup.

2. Save the theme.css to osticketDirectory\assets\default\css\theme.css -OR- open osticketDirectory\assets\default\css\theme.css

A. To make the landing page fit together a little better scroll or find:

#landing_page #new_ticket

change

margin-top: 40px;

to

margin-top: 10px;

scroll or find:

#landing_page #check_status

change

margin-top: 40px;

to

margin-top: 10px;

 

B. add the following to the bottom

#openticks {
  padding:5px;
  background:#BFBFBF;
  -moz-border-radius: 5px;
  border-radius: 5px;
  -moz-box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.4);
  -webkit-box-shadow: 3px 3px rgba(0, 0, 0, 0.4);
  box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.4);
}

#openticks-a {
  border-right-style: solid;
  border-right-width: 1px;
  border-right-color: #BFBFBF;
  text-align:center;
  vertical-align:middle;
  padding-bottom:4px;
}

#openticks-b {
  text-align:center;
  vertical-align:middle;
  padding-bottom:4px;
}

3. Copy the index.php (included) into your base osTicket folder -OR- open and edit \index.php scroll down and replace line 50-54

<p>Be sure to browse our <a href="kb/index.php">Frequently Asked Questions (FAQs)</a>, before opening a ticket.</p>
</div>
<?php
} ?>
<?php require(CLIENTINC_DIR.'footer.inc.php'); ?>

change to:

<p>Be sure to browse both our <a href="kb/index.php">Frequently Asked Questions (FAQs)</a>, and the open tickets below before opening a ticket.  Thank you.
  <div id="openticks"><?php include('display_open_topics.php'); ?></div>
</p>
</div>
<?php
} ?>
<?php require(CLIENTINC_DIR.'footer.inc.php'); ?>

NOTE: This will not get displayed if you have not enabled and setup knowledgebases and have a public FAQ! To do so read this article: setting up and using FAQS in osticket. Alternatively you can replace the code change above with this one:

<?php
if($cfg && $cfg->isKnowledgebaseEnabled()){
    //FIXME: provide ability to feature or select random FAQs ??
?>
<p>Be sure to browse both our <a href="kb/index.php">Frequently Asked Questions (FAQs)</a>.
<?php
} ?>
<p>Please review the open tickets below before opening a ticket.  Thank you.
<div id="openticks"><?php include('display_open_topics.php'); ?></div>
</p>
</div>
<?php require(CLIENTINC_DIR.'footer.inc.php'); ?>

The file archive for this mod can be downloaded here.