{"action":"opened","issue":{"url":"https://api.github.com/repos/osTicket/osTicket/issues/3334","repository_url":"https://api.github.com/repos/osTicket/osTicket","labels_url":"https://api.github.com/repos/osTicket/osTicket/issues/3334/labels{/name}","comments_url":"https://api.github.com/repos/osTicket/osTicket/issues/3334/comments","events_url":"https://api.github.com/repos/osTicket/osTicket/issues/3334/events","html_url":"https://github.com/osTicket/osTicket/issues/3334","id":174278948,"number":3334,"title":"DB Error #1146","user":{"login":"Af0x","id":7013929,"avatar_url":"https://avatars.githubusercontent.com/u/7013929?v=3","gravatar_id":"","url":"https://api.github.com/users/Af0x","html_url":"https://github.com/Af0x","followers_url":"https://api.github.com/users/Af0x/followers","following_url":"https://api.github.com/users/Af0x/following{/other_user}","gists_url":"https://api.github.com/users/Af0x/gists{/gist_id}","starred_url":"https://api.github.com/users/Af0x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Af0x/subscriptions","organizations_url":"https://api.github.com/users/Af0x/orgs","repos_url":"https://api.github.com/users/Af0x/repos","events_url":"https://api.github.com/users/Af0x/events{/privacy}","received_events_url":"https://api.github.com/users/Af0x/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-31T13:52:25Z","updated_at":"2016-08-31T13:52:25Z","closed_at":null,"body":"Hello, I think this error is a result out of [this Issue](https://github.com/osTicket/osTicket/issues/3326)\r\n\r\n[SELECT A4.`staff_id` AS `lock__staff_id`,  A1.`staff_id` AS `staff_id`,  A1.`isoverdue` AS `isoverdue`,  A1.`team_id` AS `team_id`,  A1.`ticket_id` AS `ticket_id`,  A1.`number` AS `number`,  A2.`subject` AS `cdata__subject`,  A6.`address` AS `user__default_email__address`,  A1.`source` AS `source`,  A3.`priority_color` AS `cdata__:priority__priority_color`,  A3.`priority_desc` AS `cdata__:priority__priority_desc`,  A1.`status_id` AS `status_id`,  A7.`name` AS `status__name`,  A7.`state` AS `status__state`,  A1.`dept_id` AS `dept_id`,  A8.`name` AS `dept__name`,  A5.`name` AS `user__name`,  A1.`lastupdate` AS `lastupdate`,  A1.`isanswered` AS `isanswered`,  B0.`firstname` AS `staff__firstname`,  B0.`lastname` AS `staff__lastname`,  B1.`name` AS `team__name`,  (SELECT COUNT(R0.`id`) AS `count` FROM `ost_thread` Q7 JOIN `ost_ticket` Q8 ON (Q7.`object_type` = 'T' AND Q7.`object_id` = Q8.`ticket_id`) LEFT JOIN `ost_thread_collaborator` R0 ON (Q7.`id` = R0.`thread_id`) WHERE Q8.`ticket_id` = A1.`ticket_id`) AS collab_count,  (SELECT COUNT(R1.`id`) AS `count` FROM `ost_thread` Q7 JOIN `ost_ticket` Q8 ON (Q7.`object_type` = 'T' AND Q7.`object_id` = Q8.`ticket_id`) LEFT JOIN `ost_thread_entry` R0 ON (Q7.`id` = R0.`thread_id`) LEFT JOIN `ost_attachment` R1 ON (R1.`type` = 'H' AND R0.`id` = R1.`object_id`) WHERE Q8.`ticket_id` = A1.`ticket_id` AND R1.`inline` = 0) AS attachment_count,  (SELECT COUNT(R0.`id`) AS `count` FROM `ost_thread` Q7 JOIN `ost_ticket` Q8 ON (Q7.`object_type` = 'T' AND Q7.`object_id` = Q8.`ticket_id`) LEFT JOIN `ost_thread_entry` R0 ON (Q7.`id` = R0.`thread_id`) WHERE Q8.`ticket_id` = A1.`ticket_id` AND NOT R0.`flags` & 4 != 0) AS thread_count FROM `ost_ticket` A1 LEFT JOIN `ost_ticket__cdata` A2 ON (A1.`ticket_id` = A2.`ticket_id`) LEFT JOIN `ost_ticket_priority` A3 ON (A2.`priority` = A3.`priority_id`) LEFT JOIN `ost_lock` A4 ON (A1.`lock_id` = A4.`lock_id` AND A4.`expire` > NOW()) JOIN `ost_user` A5 ON (A1.`user_id` = A5.`id`) LEFT JOIN `ost_user_email` A6 ON (A5.`default_email_id` = A6.`id`) JOIN `ost_ticket_status` A7 ON (A1.`status_id` = A7.`id`) JOIN `ost_department` A8 ON (A1.`dept_id` = A8.`id`) LEFT JOIN `ost_staff` B0 ON (A1.`staff_id` = B0.`staff_id`) LEFT JOIN `ost_team` B1 ON (A1.`team_id` = B1.`team_id`) WHERE A1.`ticket_id` IN (SELECT A1.`ticket_id` FROM `ost_ticket` A1 JOIN `ost_ticket_status` A2 ON (A1.`status_id` = A2.`id`) WHERE A1.`isanswered` = 0 AND A2.`state` = 'open' AND ((A2.`state` = 'open' AND A1.`staff_id` = 1) OR A1.`dept_id` IN ('1'))) GROUP BY A4.`staff_id`,  A1.`staff_id`,  A1.`isoverdue`,  A1.`team_id`,  A1.`ticket_id`,  A1.`number`,  A2.`subject`,  A6.`address`,  A1.`source`,  A3.`priority_color`,  A3.`priority_desc`,  A1.`status_id`,  A7.`name`,  A7.`state`,  A1.`dept_id`,  A8.`name`,  A5.`name`,  A1.`lastupdate`,  A1.`isanswered`,  B0.`firstname`,  B0.`lastname`,  B1.`name` ORDER BY A3.`priority_urgency` ASC,  A1.`lastupdate` DESC] Table '#tablename#.ost_ticket__cdata' doesn't exist\r\n\r\n ---- Backtrace ----\r\n #0 (root)/include/mysqli.php(204): osTicket->logDBError('DB Error #1146',  '[SELECT A4.`sta...')\r\n #1 (root)/include/class.orm.php(3121): db_query('SELECT A4.`staf...',  true,  true)\r\n #2 (root)/include/class.orm.php(3168): MySqlExecutor->execute()\r\n #3 (root)/include/class.orm.php(1847): MySqlExecutor->getArray()\r\n #4 (root)/include/class.orm.php(1797): HashArrayIterator->{closure}()\r\n #5 (root)/include/class.orm.php(1776): CallbackSimpleIterator->next()\r\n #6 (root)/include/class.orm.php(1785): CallbackSimpleIterator->rewind()\r\n #7 (root)/include/class.orm.php(1452): CallbackSimpleIterator->valid()\r\n #8 (root)/include/class.orm.php(1462): CachedResultSet->fillTo(9223372036854775807)\r\n #9 (root)/include/class.orm.php(1471): CachedResultSet->asArray()\r\n #10 (root)/include/staff/tickets.inc.php(506): CachedResultSet->getIterator()\r\n #11 (root)/scp/tickets.php(492): require_once('/var/dir/...')\r\n #12 (root)/scp/index.php(17): require('/var/dir/...')\r\n #13 {main}\r\n\r\nRegards,\r\n\r\nAf0x"}}
{"actor":{"display_login":"Af0x"}}