From 56bad47cd1dbf49f66a4a214f02cad6833fcb25e Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Wed, 23 Oct 2013 13:50:21 +0000
Subject: [PATCH] Support ownerId in simple search

---
 include/staff/tickets.inc.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/staff/tickets.inc.php b/include/staff/tickets.inc.php
index 6c0eb1b26..0e0a7ec0d 100644
--- a/include/staff/tickets.inc.php
+++ b/include/staff/tickets.inc.php
@@ -76,6 +76,11 @@ if($status) {
     $qwhere.=' AND status='.db_input(strtolower($status));
 }
 
+if (isset($_REQUEST['ownerId'])) {
+    $qwhere .= ' AND ticket.user_id='.db_input($_REQUEST['ownerId']);
+    $qstr .= '&ownerId='.urlencode($_REQUEST['ownerId']);
+}
+
 //Queues: Overloaded sub-statuses  - you've got to just have faith!
 if($staffId && ($staffId==$thisstaff->getId())) { //My tickets
     $results_type='Assigned Tickets';
-- 
GitLab