Hi Masino,
I am not questioning the difference in functionality of the two MODs but rather how to integrate the two in one osTicket installation. For instance; in your "The Duration Time MOD" you replace the following code in \include\staff\viewticket.inc.php with;
$resp =db_query($sql);
while ($resp_row = db_fetch_array($resp)) {
$respID=$resp_row;
?>
<?=Format:($resp_row)?> - <?=$resp_row?>
<?if($resp_row>0){ ?>
<?=$ticket->getAttachmentStr($respID,'R')?>
<?}?>
<?=Format:($resp_row)?>
<?}
$msgid =$msg_row;
}?>
with the following;
$resp =db_query($sql);
$j=1;
while ($resp_row = db_fetch_array($resp)) {
$i++;
$respID=$resp_row;
$dateend = $resp_row;
$lastdate = $dateend;
$datediff = new Duration($datebegin,$dateend);
$resultdiff=$datediff->Duration($datebegin,$dateend);
?>
<?php echo "(#".$i.") "; echo Format:($resp_row)?> - <?php echo $resp_row?>
<?php if($resp_row>0){ ?>
<?php echo $ticket->getAttachmentStr($respID,'R')?>
<?php }?>
<?php echo Format:($resp_row); ?>
<?php echo "Duration: ".$resultdiff.""; ?>
<?php
$datebegin = $dateend;
$j++;
}
$msgid =$msg_row;
$i++;
}
$datediff = new Duration($firstdate,$lastdate);
$resultdiff=$datediff->Duration($firstdate,$lastdate);
?>
<?php
$totalpost = $i-1;
if ($ticket->getStatus()=='open') {
echo "Total: ".$totalpost." post(s), Duration: ".$resultdiff."";
$lastdate = date("Y-m-d H"); //userdate(); //date("Y-m-d H");
$datediff = new Duration($firstdate,$lastdate);
$resultdiff=$datediff->Duration($firstdate,$lastdate);
echo "Ticket still opened, Total Duration: ".$resultdiff."";
} else {
echo "Total: ".$totalpost." post(s), Duration: ".$resultdiff."";
}
?>
In your new Auto Staff Time Sheet MOD you require that under \include\staff\viewticket.inc.php the;
<?=Format:($resp_row)?> - <?=$resp_row?>
be replaced with;
<?=Format:($resp_row)?> - <?=$resp_row?>, Time Spent: <?php echo $timespentstaff; ?>
but that code does not exist any longer since it was modified by your earlier code for the "The Duration Time MOD".
Regards,
Beeman