Sorry i'm not really a coder....care to elaborate on that one as well?? I need step by step instructions or it takes me a while to dig through the code and figure it out....
if you look at avgrespontime_alltime.php we have the following code
<?php
// MySQL Query from HELL
$query = "
SELECT
AVG(
FLOOR(DATEDIFF(
(SELECT sec.created
FROM ".TICKET_THREAD_TABLE." as sec
WHERE main.ticket_id = sec.ticket_id
GROUP BY sec.ticket_id)
,main.created)/7)*5 +
DATEDIFF(
(SELECT sec.created
FROM ".TICKET_THREAD_TABLE." as sec
WHERE main.ticket_id = sec.ticket_id
GROUP BY sec.ticket_id)
,main.created)%7 -
IF( DAYOFWEEK(main.created) = 1, IF(DAYOFWEEK(
(SELECT sec.created
FROM ".TICKET_THREAD_TABLE." as sec
WHERE main.ticket_id = sec.ticket_id
GROUP BY sec.ticket_id)
) = 7, 2, 1),
IF( DAYOFWEEK(main.created) = 7, IF(DAYOFWEEK(
(SELECT sec.created
FROM ".TICKET_THREAD_TABLE." as sec
WHERE main.ticket_id = sec.ticket_id
GROUP BY sec.ticket_id)
) = 1, 1, 2),
IF( DAYOFWEEK(
(SELECT sec.created
FROM ".TICKET_THREAD_TABLE." as sec
WHERE main.ticket_id = sec.ticket_id
GROUP BY sec.ticket_id)
) < DAYOFWEEK(main.created), 2, 0 )))
) as fubar
FROM ".TICKET_TABLE." as main";
$result=mysql_query($query);
$fu = mysql_result($result,0);
// convert days to seconds (*24 hours *60 minutes *60seconds)
$timeInSeconds = $fu * 24 * 60 * 60;
echo "<b>All Time:</b> ".duration($timeInSeconds)."<br>";
?>
so where you see the code WHERE main.ticket_id = sec.ticket_id below it add AND sec.thread_type = 'R' to get all replies from staff.
Note: Running the Reports page may take a while as it takes the info from the DB and displays the same as graph(Pie Chart)