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.9.3 is now available! Go get it now

Ticket reporting

We have some one that currently runs reports on our tickets to see what the most issues are and what department they are in ect.

He came to me asking if i could more easily sort the tickets then just having them by department?

Can some one create a mod for me so i can add something to each ticket. Like if it's a monitor problem we could have that option in a drop down or something and be able to pick it.

It would really help.

Thanks
Ryan

Comments

  • Hey,

    I did that in combination with the Reporting Panel:
    http://www.osticket.com/forums/showthread.php?t=1537

    First, I customized my /staff/newticket.inc.php and my /client/open.inc.php by adding a new dropdown-field for the departments in each file.

    Then I custmized the /scp/graphs/sBar.VolContact.php from the Reporting Panel MOD by changing the sql-statements that I can see the statistic for the departments.(I don't need the "Ticket Volume by Contact Method")

    Now I can see which ticket comes from which department and how many tickets come from the different departments.

    Is that the same you want or did I missunderstand you?

    Greetings,
    Torben
  • i was looking for something that the staff can set from like a list.


    > Issues <
    Monitor
    Mouse
    Keyboard
    Software
    Ect


    That way my guy can just do a query and say. How many keyboard problems did we have from jan 1 - august 31st
  • Hey,
    as I wrote, I would do that by adding the Reporting Panel from that thread:

    http://www.osticket.com/forums/showthread.php?t=1537

    After you did that, take a look at this thread:

    http://osticket.com/forums/showthread.php?t=873

    In
    /staff/newticket.inc.php AND /client/open.inc.php
    you ADD the following code for the dropdown-menue:

    <tr>
    <td align=\"left\">Issues:</td>
    <td>
    <select name=\"issues\">
    <option value\"\"selected >-Please select-</option>
    <option>Monitor</option>
    <option>Mouse</option>
    <option>Keyboard</option>
    <option>ect</option>
    </select>
    </td>
    </tr>


    After you did that it is possible to choose which issue the ticket is about and you can see it also in every ticket.

    Now you have to write the different SQL-Statements for your need. I put that in /scp/graphs/sBar.VolContact.php, because I don't need the "Ticket Volume by Contact Method". You can choose another or write a new one.

    For example:

    //Count Monitor tickets
    $sql='SELECT COUNT(*) AS cnt FROM ost_ticket
    WHERE closed LIKE \"'.$_REQUEST['month'].'-%\" AND issues = \"monitor\" AND(';
    $f=$_REQUEST['f'];
    $j=0;
    while($j<$f){
    $sql.='dept_id=\"'.$_REQUEST['dept'.$j].'\" OR ';
    $j++;
    }
    $sql.='0 )';

    $result = mysql_query($sql);
    if ($myrow=mysql_fetch_array($result)){
    if($myrow['cnt']>0){
    $datay[] .= $myrow['cnt'];
    }else{$datay[] .= 0;}
    }



    Hope it will help!

    Greetings,
    Torben
  • we need the option on the backend because we dont want the user to be able to set the option.

    We want to set the option cause just because a monitor isnt working it may not be the monitor but the computer hardware itself.

    so while a user would select monitor it would really be a hardware issue.

    Thats why i need something in the staff area to set this.
  • Ok, than put the dropdown-menue only in /staff/newticket.inc.php.

    And with this MOD:

    http://www.osticket.com/forums/showthread.php?t=1095

    you can change the "Issues" field, if it would be necessary...for example if a client will write a ticket.

    Greetings,
    Torben
  • thanks i got most of it down.

    the one thing i dont know how to do is, if i select say monitor how can i have it auto update as soon as i select an option so i dont need a "submit" button for it?

    i'm working with

    <option value=\"<?=Format::htmlchars($issue->getName())?>\" id=\"issue\" /><a href=\"javascript:editTicket(<?=$id?>,'issue')\">poop</option>


    i know it's not right cause it blows up my whole page but it's a start.
  • Hm..I think, I know what you mean, but it's a little bit complicated.

    Why don't you put the following code in /staff/viewticket.inc.php?

    <tr>
    <th>Issue:</th>
    <td><input type=\"text\" name=\"issue\" size=\"30\" value=\"<?=$ticket->getIssue()?>\" id=\"issue\" /><a href=\"javascript:editTicket(<?=$id?>,'issue')\"><img src=\"../images/icons/ticket_edit.gif\" /></a></td>
    </tr>


    That is the easiest way.
    First you write a new ticket in which you select "Monitor".
    Later, if you see that the problem is the computer instead of the monitor, you are able to change only this field in 'computer'. This field will be updated also in the database.

    Is that ok for you?

    Greetings,
    Torben
  • boss never wants the user to have the option or see any of the info we put in for "issue"

    He also wants it to be a drop down with set options so that we wont have mis spellings or other miss matched info.

    Like if an issue is a printer problem one staff member might put "printer" while another might put "printer had no paper"

    so he wants a set list of options to choose from. :mad:


    Edit:

    Thank you for all your help BTW,

    - Ryan
  • since the internet is too stupid to answer my question and i not knowing on how to do this.


    How can i make a drop down that says.

    internet
    computers
    phones
    ect
    ect

    and when i select one of them have it auto populate a text field?
  • Auto-populating fields.
    said:

    since the internet is too stupid to answer my question and i not knowing on how to do this.


    How can i make a drop down that says.

    internet
    computers
    phones
    ect
    ect

    and when i select one of them have it auto populate a text field?

    To do something like this, you can use Javascript. I do this on my ticketing system and is rather easy.

    All these MOD's are in your /include/staff/newticket.inc.php

    1. Put your select box wherever you'd like:
    [HTML][/HTML]

    2. Put this towards the end of the newticket.inc.php and include the different values you want to auto-populate
    [HTML]
    function autopopulateInfo(form)
    {
    if(form.source.value == 'internet'){form.blah1.value = 'text goes here'; form.blah2.value = 'blah 2 text goes here';}
    if(form.source.value == 'computers'){form.blah1.value = 'alternate text goes here'; form.blah2.value = 'more text goes here';}
    }
    [/HTML]

    3. Put your inputs into the code (labeled blah1 and blah2 in my example)

    As long as you have javascript enabled, it'll work.
  • said:

    As long as you have javascript enabled, it'll work.

    That is correct. And to state the obvious: If you do NOT have javascript enables, then it will NOT work. There are plently of users who do not have javascript enabled, and this may prevent them from using your system correctly. Something to keep in mind. Of course, if you are in a controlled corporate environment, then it is not such a big deal, as probably everyone will have it enabled.
Sign In or Register to comment.