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

display_open_topics.php for osTicket 1.9.x?

I am trying to setup an internal support system where people can submit tickets regarding operations at our offices.
Before anyone submits anything, I'd like them to see what has already been submitted so that we don't end up with 20 people reporting the same thing.

I found ntoziers display_open_topics.php, but it seems the SQL structure has changed significantly since 1.7 where this worked.

Can someone modify it to work with 1.9.x or is there anything else that allows me to show open tickets to the "public"?
I say "public", because the site is only accesible from our internal network.


  • I updated it to work with 1.9.1 but never quite got around to fixing a couple bugs I had with it and releasing it.  I also wasn't happy with the update I made since I didn't feel like it was the best way to do it once I had finished. Since it appears that I have to do so now for I'll see what I can do.

    Ultimately I think that I will be migrating the mod to a plugin, but I've been waiting for the plugin documentation from the devs.
  • I'd be happy with any simple list at all... do you have anything that will display something?
    I got my bosses on me, and I'm a sysop - I know nothing of PHP.
    Even though some functions doesn't work or it doesnt display everything, having something that lists any ticket with status open (and the description + header of that ticket) is awesome.

  • Trying here as well: I'd like to have a solution to show all open tickts to the public ( ). Is a working version available for the current version?
  • Thanks ntozier!

    You've got a little spell mistake in your article: You named your file in the code "display_open_topics_2.php" which of course must be "display_open_topics.php".

    I changed the display_open_topics.php file just the data for username, password & database - and limit. But calling the file still gives me "There are no tickets open at this time." even if there are some open test tickets. Same calling the file alone in the browser. Any tip for me where to search for the error?

    When I log mysel into osTicket with a (public) user account and I go to "Tickets" I can see 4 "offen" ones ;)  
  • typo fixed.

    Did you edit the display_open_topics.php for your system?
  • On your blog it still reads "php include('display_open_topics_2.php" :)

    Like described above: I changed the display_open_topics.php file just the data for username, password & database - and limit.

  • edited December 2015
    Forget it - got it. The "optional" step "openid" *must* be filled - with 1 in my case. Then it works! Maybe pre-fill it with "1" or throw away the "optional" word since this is necessary :)

    Fields "priority" and "issue" not filled currently. Priority possible OK because dunno if my testcases got a priority but "issue" should be the "Betreff's" I guess. Need to look up that stuff!


  • Hmm.
    Check your PHP logs and see if you have an error?
    Check your MySQL logs and see if you have an error?
  • edited December 2015
    apache error log shows:

    concerning lines are exactly these ones for getting info for priority & topic out of the DB:

    104:   $subject = mysql_result($subjectresult,0,"value");
    109:   $priority = mysql_result($priorityresult,0,"value");

  • edited December 2015
    What version of osTicket are you running?  There might be a change between what I tested it on (1.9.7) and your version and another change to 1.10rc2 (which I also played with).

    The error that you are getting is that there is no result being returned by the DB... So I will have to tweak the SQL for the different DB format you have.
  • The latest stable version - osTicket (v1.9.12)!
  • I just cloned my 1.9.7 site.  Upgraded it to 1.9.12 and installed the display_open_topics.php, and it works fine for me .

    So I'm thinking that your subject and priority are not field_id 5 and 7 like they are in my installation.  Take a look at your ".TABLE_PREFIX."form_entry_values table and see if you can figure out which one is which and change the numbers.  I'll have to find a better way to determine which is which automagically from the DB at some point.
  • I did a completely new fresh 1.9.12 install - no upgrade. Regarding form_entry_values it looks like the topic is number 20 and priority maybe 22 - at least it's the second field in that table which exists net to the topic. But changing your script to

      $subjectsql = "SELECT value FROM ".TABLE_PREFIX."form_entry_values WHERE entry_id=$entry_id and field_id=20";

    doesn't change anything @ output.
  • Hrm.  Can you email or PM me a screen shot of some of your ost_form_entry_values?
  • You've got mail! :)
  • So do you. :)
  • Do you have any plans to build this out to include custom forms?

    I can see applications where it may be useful to just return a load of db information from all client forms to a table for internal viewing -- sort of like an high information, quick glance scenario with no authentication required.

    This could also prove useful for web scrapping tools and creating super fast API's for plugin to external reporting dashboards.

Sign In or Register to comment.