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

bug: Support quick user filter

Support filtering search results by uid.
parent 7a763c01
No related branches found
No related tags found
No related merge requests found
...@@ -59,12 +59,7 @@ case 'search': ...@@ -59,12 +59,7 @@ case 'search':
))); )));
} }
break; break;
} } elseif (isset($_SESSION['advsearch'])) {
elseif (isset($_GET['uid'])) {
// Apply user filter
$tickets->filter(array('user__id'=>$_GET['uid']));
}
elseif (isset($_SESSION['advsearch'])) {
// XXX: De-duplicate and simplify this code // XXX: De-duplicate and simplify this code
$form = $search->getFormFromSession('advsearch'); $form = $search->getFormFromSession('advsearch');
$form->loadState($_SESSION['advsearch']); $form->loadState($_SESSION['advsearch']);
...@@ -87,6 +82,12 @@ case 'open': ...@@ -87,6 +82,12 @@ case 'open':
break; break;
} }
// Apply user filter
if (isset($_GET['uid'])) {
$tickets->filter(array('user__id'=>$_GET['uid']));
}
// Apply primary ticket status // Apply primary ticket status
if ($status) if ($status)
$tickets->filter(array('status__state'=>$status)); $tickets->filter(array('status__state'=>$status));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment