Skip to content
Snippets Groups Projects
Commit bf4416af authored by Peter Rotich's avatar Peter Rotich
Browse files

bug: Fix advanced search by status

parent 2accf587
No related branches found
No related tags found
No related merge requests found
...@@ -135,8 +135,8 @@ class TicketsAjaxAPI extends AjaxController { ...@@ -135,8 +135,8 @@ class TicketsAjaxAPI extends AjaxController {
// Status // Status
if ($req['statusId'] if ($req['statusId']
&& ($status=TicketStatus::lookup($req['statusId']))) { && ($status=TicketStatus::lookup($req['statusId']))) {
$where .= sprintf(' AND status.state="%s" ', $where .= sprintf(' AND status.id="%d" ',
$status->getState()); $status->getId());
$criteria['status_id'] = $status->getId(); $criteria['status_id'] = $status->getId();
} }
......
...@@ -55,9 +55,10 @@ switch(strtolower($_REQUEST['status'])){ //Status is overloaded ...@@ -55,9 +55,10 @@ switch(strtolower($_REQUEST['status'])){ //Status is overloaded
$results_type=__('Answered Tickets'); $results_type=__('Answered Tickets');
break; break;
default: default:
if(!$search && !isset($_REQUEST['advsid'])) if (!$search && !isset($_REQUEST['advsid'])) {
$_REQUEST['status']=$status='open'; $_REQUEST['status']=$status='open';
$results_type=__('Open Tickets'); $results_type=__('Open Tickets');
}
} }
$qwhere =''; $qwhere ='';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment