Hello
I'm using osTicket 1.14.1 with php 7.3 for 4 months.
Yesterday I started getting those error messages
How can I resolve this error?
[SELECT COUNT(DISTINCT CASE WHEN A1.
ticket_id= Z1.
ticket_idTHEN A1.
ticket_idEND) AS
q25, COUNT(DISTINCT CASE WHEN A2.
idIN (1) AND A2.
state= 'open' AND A1.
dept_idIN (12, 9, 13, 5, 11) AND A3.
object_type= 'T' THEN A1.
ticket_idEND) AS
q21, COUNT(DISTINCT CASE WHEN A2.
idIN (1) AND A2.
state= 'open' AND NOT A1.
dept_id= 5 AND A1.
createdIS NOT NULL AND A1.
est_duedateIS NOT NULL AND A3.
object_type= 'T' THEN A1.
ticket_idEND) AS
q19, COUNT(DISTINCT CASE WHEN A2.
state= 'closed' AND A3.
object_type= 'T' THEN A1.
ticket_idEND) AS
q8, COUNT(DISTINCT CASE WHEN A2.
state= 'closed' AND A2.
state= 'closed' AND A1.
closedBETWEEN '2020-10-27 00:00:00' AND '2020-10-27 23:59:59' AND A3.
object_type= 'T' THEN A1.
ticket_idEND) AS
q9, COUNT(DISTINCT CASE WHEN A2.
state= 'closed' AND A2.
state= 'closed' AND A1.
closedBETWEEN '2020-10-26 00:00:00' AND '2020-10-26 23:59:59' AND A3.
object_type= 'T' THEN A1.
ticket_idEND) AS
q10, COUNT(DISTINCT CASE WHEN A2.
state= 'closed' AND A2.
state= 'closed' AND A1.
closedBETWEEN '2020-10-26 00:00:00' AND '2020-11-01 23:59:59' AND A3.
object_type= 'T' THEN A1.
ticket_idEND) AS
q11, COUNT(DISTINCT CASE WHEN A2.
state= 'closed' AND A2.
state= 'closed' AND A1.
closedBETWEEN '2020-10-01 00:00:00' AND '2020-10-31 23:59:59' AND A3.
object_type= 'T' THEN A1.
ticket_idEND) AS
q12, COUNT(DISTINCT CASE WHEN A2.
state= 'closed' AND A2.
state= 'closed' AND A1.
closedBETWEEN '2020-10-01 00:00:00' AND '2020-12-31 23:59:59' AND A3.
object_type= 'T' THEN A1.
ticket_idEND) AS
q13, COUNT(DISTINCT CASE WHEN A2.
state= 'closed' AND A2.
state= 'closed' AND A1.
closedBETWEEN '2020-01-01 00:00:00' AND '2020-12-31 23:59:59' AND A3.
object_type= 'T' THEN A1.
ticket_idEND) AS
q14, COUNT(DISTINCT CASE WHEN A2.
state= 'open' AND A3.
object_type= 'T' THEN A1.
ticket_idEND) AS
q1, COUNT(DISTINCT CASE WHEN A2.
state= 'open' AND A2.
state= 'open' AND A1.
isanswered= '0' AND A3.
object_type= 'T' THEN A1.
ticket_idEND) AS
q2, COUNT(DISTINCT CASE WHEN A2.
state= 'open' AND A2.
state= 'open' AND A1.
isanswered= '1' AND A3.
object_type= 'T' THEN A1.
ticket_idEND) AS
q3, COUNT(DISTINCT CASE WHEN A2.
state= 'open' AND A2.
state= 'open' AND A1.
isoverdue= '1' AND A3.
object_type= 'T' THEN A1.
ticket_idEND) AS
q4, COUNT(DISTINCT CASE WHEN A1.
staff_idIN (4) AND A2.
state= 'open' AND A3.
object_type= 'T' THEN A1.
ticket_idEND) AS
q5, COUNT(DISTINCT CASE WHEN A1.
staff_idIN (4) AND A2.
state= 'open' AND A1.
staff_idIN (4) AND A2.
state= 'open' AND A1.
staff_idIN (4) AND A3.
object_type= 'T' THEN A1.
ticket_idEND) AS
q6, COUNT(DISTINCT CASE WHEN A1.
staff_idIN (4) AND A2.
state= 'open' AND A1.
staff_idIN (4) AND A2.
state= 'open' AND NOT A1.
staff_idIN (4) AND A3.
object_type= 'T' THEN A1.
ticket_idEND) AS
q7FROM
ost_ticketA1 JOIN
ost_ticket_statusA2 ON (A1.
status_id= A2.
id) LEFT JOIN
ost_threadA3 ON (A3.
object_type= 'T' AND A1.
ticket_id= A3.
object_id) LEFT JOIN
ost_thread_referralA4 ON (A3.
id= A4.
thread_id) LEFT JOIN
ost_staffA5 ON (A4.
object_type= 'S' AND A4.
object_id= A5.
staff_id) LEFT JOIN
ost_threadA6 ON (A1.
ticket_id= A6.
object_idAND A6.
object_type= 'C') LEFT JOIN
ost_thread_referralA7 ON (A6.
id= A7.
thread_id) LEFT JOIN
ost_staffA8 ON (A7.
object_type= 'S' AND A7.
object_id= A8.
staff_id) LEFT JOIN
ost_departmentB0 ON (A4.
object_type= 'D' AND A4.
object_id= B0.
id) LEFT JOIN
ost_departmentB1 ON (A7.
object_type= 'D' AND A7.
object_id= B1.
id) WHERE ((A2.
state= 'open' AND (A1.
staff_id= 4 OR A5.
staff_id= 4 OR A6.
object_type= 'C' AND A8.
staff_id= 4)) OR (A2.
stateIN ('open', 'closed') AND (A1.
dept_idIN (4) OR B0.
idIN (4))) OR A6.
object_type= 'C' AND B1.
id` IN (4))]
Unknown column 'Z1.ticket_id' in 'field list'<br />
<br />
---- Stega bakåt ----<br />
#0 (root)/include/mysqli.php(200): osTicket->logDBError('DB Error #1054', '[SELECT COUNT(D...')<br />
#1 (root)/include/class.orm.php(3459): db_query('SELECT COUNT(DI...', true, true)<br />
#2 (root)/include/class.orm.php(3506): MySqlExecutor->execute()<br />
#3 (root)/include/class.orm.php(2093): MySqlExecutor->getArray()<br />
#4 (root)/include/class.orm.php(2043): HashArrayIterator->{closure}()<br />
#5 (root)/include/class.orm.php(2022): CallbackSimpleIterator->next()<br />
#6 (root)/include/class.orm.php(2031): CallbackSimpleIterator->rewind()<br />
#7 (root)/include/class.orm.php(1703): CallbackSimpleIterator->valid()<br />
#8 (root)/include/class.orm.php(1713): CachedResultSet->fillTo(9223372036854775807)<br />
#9 (root)/include/class.orm.php(1336): CachedResultSet->asArray()<br />
#10 (root)/include/class.orm.php(1359): QuerySet->all()<br />
#11 (root)/include/class.search.php(973): QuerySet->one()<br />
#12 (root)/include/class.search.php(905): SavedQueue::counts(Object(StaffSession), true)<br />
#13 (root)/include/staff/templates/queue-tickets.tmpl.php(111): SavedQueue->getCount(Object(StaffSession))<br />
#14 (root)/scp/tickets.php(577): require_once('(root)/i...')<br />
#15 {main}
`