Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Add a tab/table to Dashboard -> Statistics. How?

Hi all,

I'd like to add a table to Dashboard -> Statistics, where currently Department, Topics & Agent show. We would like to add a tab/table for Organizations, which shows per organization the amount of open/closed/etc tickets for the selected time period.

Is this easy/doable? Where do you recommend I start?


  • I would start by looking at /scp/dashboard.php
    And then proceed to /include/staff/

    You will of course need to know PHP and HTML to alter things.
  • Hi, we recently did something very similar (logging ticket time tracking per organisation then showing it on the dashboard). I don't think all my code will help but below are the files which I edited to do it, and a brief description of each:

    * include/ajax.reports.php : includes actual queries run on dashboard page.
    * scp/dashboard.php : sets the html to include the reports on the dashboard.
    * scp/css/dashboard.css : css styles for new table.
    * scp/js/ : javascript functions to switch between tabs and call data download.
    * scp/ajax.php : map urls to function calls.

    You'll have to write your own query to pull the data out, then call it. Speaking vaguely, I created renamed copies of most classes to ensure there was no clashing with the standard table. Hope that helps, feel free to post/PM me if you get stuck on something!

  • Thank you, ntozier & melipone  :)

    This sounds promising. My PHP skills are minimal, but there may be someone else in my organisation who can assist me with that.

    melipone, I'll PM you :)
  • Looks like I can't send you files via PM, I've attached them here instead. Sorry my osTicket version is actually v1.9.14, so it's possible the content in include/ajax.reports.php has been moved (maybe to include/staff/dashboard.php as I don't have that file, and ntozier mentioned it).

    Grep the files for "mod-" which bound the start and end of my changes/new code. I am also a very amateur php dabbler so it would probably be best to get your php person to check it!

    My SQL query produces time spent per organisation/department/staff member/ticket activity by category of time tracked, which is another customisation in my installation. If you simply copy/paste my code it will not work, you'll need to go through each file and tailor the class/content to your setup, particularly the SQL query.
  • Thank you so much! :)

    I think your code (for the dashboard) & osTicket reports (for more extensive reports) will get us far  :)

Sign In or Register to comment.