Try this
modify this code
if($startTime){
$qwhere.=' AND ticket.duedate>=FROM_UNIXTIME('.$startTime.')';
$qstr.='&startDate='.urlencode($params);
}
if($endTime){
$qwhere.=' AND ticket.duedate<=FROM_UNIXTIME('.$endTime.')';
$qstr.='&endDate='.urlencode($params);
}
from tickets.inc.php
to this
if($startTime){
$qwhere.=' AND ticket.'.($status=='closed'?'closed':'duedate').'>=FROM_UNIXTIME('.$startTime.')';
$qstr.='&startDate='.urlencode($params);
}
if($endTime){
$qwhere.=' AND ticket.'.($status=='closed'?'closed':'duedate').'<=FROM_UNIXTIME('.$endTime.')';
$qstr.='&endDate='.urlencode($params);
}
Now when you search for closed tickets and include a date, it will filter on the closed date rather than the duedate.