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

[MOD] Report Page v5.0

24567

Comments

  • no probs, I don't think that what i'm looking for would be too difficult, but i'm just starting out with php/mysql, so i'll have to look into it a bit more!

    Basically i'm using the topics to categorise common issues and I just want to have a break down of what is being logged with the helpdesk to identify which topics are 'problem areas', this is the basic data i'm looking for:

    from date X to date Y:

    hardware support = 20 tickets (hardware support is a help topic)
    software support = 10 tickets, (software support is a help topic)
    etc
    etc

    i guess if i could get those figures i could then go a stage further and see which members of staff deal with those help topics the most so that we can see the % of work spent by them on that area.
  • English Version 3.0 has been released. See zip file on my website. Changelog is located at the bottom of the article.

    http://sudobash.net/?p=821

    Feature release.
  • English Version 3.1 has been released. See zip file on my website. Changelog is located at the bottom of the article.

    http://sudobash.net/?p=821

    New report release: Tickets per Help Topic.

    Note: Report is only viewable/functional for those on 1.6ST. The code is present for all but will not be selectable unless it passes a version check of 1.6ST. Versions 1.6RC5 and older will simply not see the option in the drop down list.

    Thanks to kevin80 for showing me how this would be able to work as of version 1.6ST.
  • this is awesome... thanks!
  • Hi Scottro,

    The Hours to resolution calculation seems to be broken again. It is showing 0 on my "Total" row under the "Hours to Resolution (Avg)" column.

    Keep up the excellent work, I am really loving this reporting feature you are developing. God bless:).
  • Hi Scottro,

    How is "Hours to Resolution" calculated? I noticed that tickets logged and cleared within a couple of minutes are somehow not included in this calculation, the value remains 0.00. Is this correct?
  • Hi Scottro,

    I have implemented the code below, however only the admin user has access to Reports Tab when logged in. My osticket is modified with some of the MODs on this forum so it could very well be that those break your code but I doubt it. Can you please check?

    if($thisuser->isAdmin() && !defined('ADMINPAGE')) { ?>
    | <a href=\"admin.php\">Admin Panel</a> | <a href=\"reports.php\">Reports</a>
    <?}else{?>
    | <a href=\"index.php\">Staff Panel </a> <? if((!$thisuser->isadmin() && !$thisuser->isManager() && $graphOptions['viewable']=='staff') ||
    (!$thisuser->isadmin() && $thisuser->isManager() && (($graphOptions['viewable']=='managers') || ($graphOptions['viewable']=='staff'))) ||
    $thisuser->isadmin())
    {?> | <a href=\"reports.php\">Reports</a> <?}?>
    <?}?>
    | <?=\"$isdeptmanager\";?><a href=\"profile.php?t=pref\">My Preference</a> | <a href=\"logout.php\">Log Out</a></p>
  • beeman;22041 said:
    Hi Scottro,

    The Hours to resolution calculation seems to be broken again. It is showing 0 on my "Total" row under the "Hours to Resolution (Avg)" column.

    Keep up the excellent work, I am really loving this reporting feature you are developing. God bless:).
    Fixed in 3.1.1, thanks for the heads up. :)
  • English Version 3.1.1 has been released. See zip file on my website. Changelog is located at the bottom of the article.

    http://sudobash.net/?p=821

    Bug Fix release.
  • beeman;22051 said:
    Hi Scottro,

    I have implemented the code below, however only the admin user has access to Reports Tab when logged in. My osticket is modified with some of the MODs on this forum so it could very well be that those break your code but I doubt it. Can you please check?
    Beeman, I had thoroughly checked this before releasing the code with 3 different people (1 staff, 1 manager, and myself an admin) and they all worked appropriately based on what selection I made in the Reports Settings page. What do you have your settings set to?
  • Hi Scottro,

    I think your code is not happy with one of the MOD I implemented some time back, but don't worry about it as I have just decided to modify it slightly so to let everyone have access to the reports. Thanks for your help.
  • English Version 3.2 has been released. See zip file on my website. Changelog is located at the bottom of the article.

    http://sudobash.net/?p=821

    Two new columns and Legend added. As always please let me know if you run into any issues.
  • -
    scottro;22213 said:
    English Version 3.2 has been released. See zip file on my website. Changelog is located at the bottom of the article.

    http://sudobash.net/?p=821

    Two new columns and Legend added. As always please let me know if you run into any issues.
    The Legend button works with Chrome, but does not work with Firefox 5.0. In addition, the input fields (option) are uglier if you use Firefox.

    - I can suggest two more things:

    - - I use the nav feature of osTicket; so I made a new tab in staff side. As icons, I use the "preference" one for report settings and a new one (called reports) for reports page. The new icon is a copy of one example graphic got using your reports webpage.

    $nav->addSubMenu(array('desc'=>'Reports','href'=>'repor ts.php','iconclass'=>'reports'));
    - $nav->addSubMenu(array('desc'=>'Report Settings','href'=>'reports_admin.php','iconclass'= >'preferences'));


    - You can replace text fields with vars -> everybody will help you translating this mod to their languages ;)

    - Poke me if I can help you with something :p
  • I can also confirm that the Legend button works on Chrome but not on Firefox 5.0. Useful addition with those two columns Scottro:).
  • The Legend button works with Chrome, but does not work with Firefox 5.0.
    Odd that this same function works in Firefox 5.0 with my Show/Hide Email Headers. I'll look into this.
    In addition, the input fields (option) are uglier if you use Firefox.
    I just installed FF5.0 to check into these issues you've reported and I don't see anything odd with these.
    - I use the nav feature of osTicket; so I made a new tab in staff side. As icons, I use the "preference" one for report settings and a new one (called reports) for reports page. The new icon is a copy of one example graphic got using your reports webpage.
    I thought about using tabs as well but decided against it since my Admin Panel already has too many tabs. If I add another one they will wrap around and look goofy. Still may do something with tabs though.
    - You can replace text fields with vars -> everybody will help you translating this mod to their languages ;)
    Thats a good idea.

    Thanks for the feedback!
  • English Version 3.2.1 has been released. See zip file on my website. Changelog is located at the bottom of the article.

    http://sudobash.net/?p=821

    Fixed issue with Firefox not liking the Legends Hide/Show functionality.
  • Thanks Scottro,

    The Legend button works now on Firefox 5.0:).
  • I've installed your report page and were loving it so far. The only thing I've run into is on the Tickets by Staff report, the results show that the staff all have closed 0 tickets and it does not calculate the average hours. It does show that all the tickets are unassigned and calculates the average hours for that one.

    I've tried to dig through the code, but can't figure out where the problem lies.
  • After doing this mod, your average time column does calculate the average time properly with new tickets.

    http://osticket.com/forums/showthread.php?t=583
  • scottro;22233 said:
    Odd that this same function works in Firefox 5.0 with my Show/Hide Email Headers. I'll look into this.


    I just installed FF5.0 to check into these issues you've reported and I don't see anything odd with these.



    I thought about using tabs as well but decided against it since my Admin Panel already has too many tabs. If I add another one they will wrap around and look goofy. Still may do something with tabs though.



    Thats a good idea.

    Thanks for the feedback!
    Hello there!

    I have made a tab in the staff side, not in the admin one. That's the reason for making it.

    My osTicket admin page has not enogh space to put another tab, like yours :P

    BTW, this option is just for those who permit staff access to reports page, so don't worry about that.

    I can translate all text fields into Spanish, but I need the name of vars before doing it :D
  • Turns out that the problem was that OST changes the "assigned to" of the ticket to "Unassigned" when the ticket is closed. This is very inconvenient. There's a mod on the forum that posts the fix. I just searched for "Closed ticket unassigned"
  • cloudpointoh;22285 said:
    Turns out that the problem was that OST changes the "assigned to" of the ticket to "Unassigned" when the ticket is closed. This is very inconvenient. There's a mod on the forum that posts the fix. I just searched for "Closed ticket unassigned"

    The mod that you say it's not complete. I mean, you MUST change the SQL query to get the total number of "My Tickets". Unless it is changed, your ticket amount will be wrong because it will count the closed tickets, too.
  • Hey OsTicket fans,
    Where could I set up role "Managers" for some users?
      <th>Reports viewable</th><td><input type=\"radio\" name=\"viewable\" value=\"admins\" <? if($row['viewable']=='admins'){ echo checked; }?>/> Admins<br>
    <input type=\"radio\" name=\"viewable\" value=\"managers\" <? if($row['viewable']=='managers'){ echo checked; }?>/> Managers<br>
    <input type=\"radio\" name=\"viewable\" value=\"staff\" <? if($row['viewable']=='staff'){ echo checked; }?>/> Staff</td>


    On Staff Member edit page there are two roles which I can asign:
    Account Type:
    -Admin
    -Staff

    If You have any idea please share with us:)

    BTW:
    This is it!
    Great work Scott! Now reporting with OsTicket is so easy and it looks really nice:D
  • ern;22337 said:
    Hey OsTicket fans,
    Where could I set up role "Managers" for some users?
      <th>Reports viewable</th><td><input type=\"radio\" name=\"viewable\" value=\"admins\" <? if($row['viewable']=='admins'){ echo checked; }?>/> Admins<br>
    <input type=\"radio\" name=\"viewable\" value=\"managers\" <? if($row['viewable']=='managers'){ echo checked; }?>/> Managers<br>
    <input type=\"radio\" name=\"viewable\" value=\"staff\" <? if($row['viewable']=='staff'){ echo checked; }?>/> Staff</td>


    On Staff Member edit page there are two roles which I can asign:
    Account Type:
    -Admin
    -Staff

    If You have any idea please share with us:)

    BTW:
    This is it!
    Great work Scott! Now reporting with OsTicket is so easy and it looks really nice:D
    Hello ern,

    I think you will be able to get it done following this:

    Admin panel -> Staff -> click on one staff member -> User Group: Managers
  • ern;22337 said:
    Hey OsTicket fans,
    Where could I set up role "Managers" for some users?
    Admin Panel > Departments > Select Department > Choose a staff member that is assigned to that department in the "Dep Manager" dropdown box.

    Glad its working out well for you, thanks for the feedback :)
  • Hi Scott and [MOD]Reports Fans,
    Thanks for quick reply,
    Yes, I did it today, I set up user as a Dept. Manager, but unfortunately he still can not see Reports in top menu.
    What should I check, what You think?:-)

    Lucas

    Ps. There is no problem with Admins.

    ===========================================

    edit:
    I checked that only link in top menu is missing for Managers,
    because when I go to address https:///scp/reports.php MOD is working perfectly:-)


    ===========================================

    edit:
    And its another thing, when I came back with my test user to normal account type (staff member, not a dept manager) he can still access to reports page, selecting in browser direct address https:///scp/reports.php

    It should be something in this code:
    if($thisuser->isAdmin() && !defined('ADMINPAGE')) { ?>
    | <a href=\"admin.php\">Admin Panel</a> | <a href=\"reports.php\">Reports</a>
    <?}else{?>
    | <a href=\"index.php\">Staff Panel </a> <? if((!$thisuser->isadmin() && !$thisuser->isManager() && $graphOptions['viewable']=='staff') ||
    (!$thisuser->isadmin() && $thisuser->isManager() && (($graphOptions['viewable']=='managers') || ($graphOptions['viewable']=='staff'))) ||
    $thisuser->isadmin())
    {?> | <a href=\"reports.php\">Reports</a> <?}?>
    <?}?>
    | <?=\"$isdeptmanager\";?><a href=\"profile.php?t=pref\">My Preference</a> | <a href=\"logout.php\">Log Out</a></p>
  • Hola a todos, es posible realizar las gráficas no por departamento si no por tema de ayuda?? en nuestra oficina tenemos sólo un departamento de soporte y varios tópicos de ayuda, espero sus comentarios. Gracias


    Hi everyone, it's possible to generate graphics but by topic help?? I mean in our office we have only one support department but too many help topics. Waitin' for comments. Thx
  • Pelusa;22482 said:
    Hola a todos, es posible realizar las gráficas no por departamento si no por tema de ayuda?? en nuestra oficina tenemos sólo un departamento de soporte y varios tópicos de ayuda, espero sus comentarios. Gracias


    Hi everyone, it's possible to generate graphics but by topic help?? I mean in our office we have only one support department but too many help topics. Waitin' for comments. Thx
    If I understand you correctly then what you want is already built into the current version of reports but it only works if you are on osTickets 1.6ST
  • scottro,

    Thanks for your amazing Reports mod. I was wondering if you can help me figure out what needs to be added to where I show a new report based on a the Simple Status system by teryakisan who has been a great help!

    Anyway, What I want to show is a report showing the current status of all tickets in a certain time period.

    I figured I don't need to touch how somebody picks the time period, I just need to add a "Show Ticket Status" Report in the drop down of Report Type.

    So basically I have 4 statuses, Working, Pending, Sold, Unsold. I want to show a pie chart of those tickets' statuses in a certain time period.

    Now, my problem is trying to figure out how to call the DB and pull data from the ost_ticket table and inside it get the status of a ticket.

    I tried mimicking what you have done with another report but I must be missing something or not calling the right values because I either get a blank screen or a full blue chart showing the total number of tickets in the system at the moment :rolleyes:

    If you can point me in the right direction I would really appreciate it!

    Thank
  • Well I'm getting somewhere I hope :)

    I am now up to a blank (no pie chart) but I am able to split up and view how many tickets are in that status (see attachment) but for some reason my "sold" status does not show up and it's blank :confused:

    Here's my code changes so far, maybe somebody can see what I'm doing wrong or what I'm forgetting to add:

    First, I added the ability to choose that report around line 63:

    <option value=\"tixSold\" <?if($_POST['type']=='tixSold'){echo \"selected\";}?>>Ticket Status</option>


    Then I "think" I'm supposed to wring something and call the DB somehow around line 100 and maybe that's why I'm not seeing a graph

    EDIT: forgot to add another thing I added around line 115

    elseif($_POST['type'] == 'tixSold'){
    $qselect = \"SELECT
    ost_ticket.sold,
    COUNT(DISTINCT(ost_ticket.ticket_id)) AS number FROM ost_ticket\";
    }


    going down, I added my new variable to "group by department" at line 227

    elseif($_POST['type'] == 'tixSold'){
    $qgroup = \"GROUP BY ost_ticket.sold ORDER BY ost_ticket.sold\";
    }


    I added a variable $Sold = 0; around line 270 because it looked like I needed it for something :p

    Next I added the headings for the table on the bottom around line 360

    elseif($_POST['type'] == 'tixSold'){
    echo \"<tr><th>Status Name</th><th>Number of tickets in that status</th></tr>\";
    }



    Finally towards line 400 I added the if else condition to see what status the ticket is in:

    elseif($_POST['type'] == 'tixSold'){
    if($row['sold'] == NULL){
    $row['helptopic'] = Sold;
    }
    elseif($row['sold'] == 1){
    $row['helptopic'] = Unsold;
    }
    elseif($row['sold'] == 2){
    $row['helptopic'] = Pending;
    }
    elseif($row['sold'] == 3){
    $row['helptopic'] = Working;
    }
    echo \"<tr style='font-weight: bold;'><td>\" . $row['helptopic']. \"</td><td>\" . $row['number'] .\" </td></tr> \";;
    }


    So from the picture, you can see that I have something going but not quite there yet...

    any suggestions/comments/hints :rolleyes:

    Thanks
    Emil
    report.png
    555 x 187 - 5K
Sign In or Register to comment.