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.'-%" AND issues = "monitor" AND(';
$f=$_REQUEST;
$j=0;
while($j<$f){
$sql.='dept_id="'.$_REQUEST.'" OR ';
$j++;
}
$sql.='0 )';
$result = mysql_query($sql);
if ($myrow=mysql_fetch_array($result)){
if($myrow>0){
$datay .= $myrow;
}else{$datay .= 0;}
}
Hope it will help!
Greetings,
Torben