Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

v.1.10-RC.2 Ticket list View bug and DB Error #1222

I've just upgraded from 1.9.12 to 1.10-RC.2 and We're having an issue with the ticket list.
The sorting appears all wrong even when I change the sort mode.
This happens with all the users and in different browsers.
I've tried clean up cache but get the same problem.
I'm also getting an error on my email that I don't know if it is related.

DB Error #1222

[SELECT COUNT(*) FROM
(SELECT A1.`ticket_id`, 0,5 AS __relevance__ FROM `ost_ticket` A1 JOIN
`ost_user` A2 ON (A1.`user_id` = A2.`id`) LEFT JOIN `ost_user_email` A3
ON (A2.`id` = A3.`user_id`) LEFT JOIN `ost_organization` A4 ON
(A2.`org_id` = A4.`id`) JOIN `ost_ticket_status` A5 ON (A1.`status_id` =
A5.`id`) WHERE (A1.`number` LIKE ? OR A2.`name` LIKE ? OR A3.`address`
LIKE ? OR A4.`name` LIKE ?) AND ((A5.`state` = ? AND (A1.`staff_id` = ?
OR A1.`team_id` IN (?))) OR A1.`dept_id` IN (?, ?, ?, ?, ?)) GROUP BY
A1.`ticket_id` UNION ALL SELECT Z1.ticket_id AS `ticket_id`,
Z1.`relevance` AS `__relevance__` FROM `ost_ticket` A1 JOIN (SELECT
COALESCE(Z3.`object_id`, Z5.`ticket_id`) as `ticket_id`, MATCH
(Z1.title, Z1.content) AGAINST ('spms' IN BOOLEAN MODE) AS `relevance`
FROM `ost__search` Z1 LEFT JOIN `ost_thread_entry` Z2 ON
(Z1.`object_type` = 'H' AND Z1.`object_id` = Z2.`id`) LEFT JOIN
`ost_thread` Z3 ON (Z2.`thread_id` = Z3.`id` AND Z3.`object_type` = 'T')
LEFT JOIN `ost_ticket` Z5 ON (Z1.`object_type` = 'T' AND Z1.`object_id`
= Z5.`ticket_id`) WHERE MATCH (Z1.title, Z1.content) AGAINST ('spms' IN
BOOLEAN MODE)) Z1 WHERE A1.`ticket_id` = Z1.`ticket_id` GROUP BY
A1.`ticket_id`) __]




The used SELECT statements have a different number of columns<br />

<br />

---- Backtrace ----<br />

#0 (raiz)/include/mysqli.php(318): osTicket->logDBError('DB Error #1222', '[SELECT COUNT(*...')<br />

#1 (raiz)/include/class.orm.php(2741): db_prepare('SELECT COUNT(*)...')<br />

#2 (raiz)/include/class.orm.php(2735): MySqlExecutor->execute()<br />

#3 (raiz)/include/class.orm.php(2829): MySqlExecutor->_prepare()<br />

#4 (raiz)/include/class.orm.php(2410): MySqlExecutor->getRow()<br />

#5 (raiz)/include/class.orm.php(1117): MySqlCompiler->compileCount(Object(QuerySet))<br />

#6 (raiz)/include/staff/tickets.inc.php(191): QuerySet->count()<br />

#7 (raiz)/scp/tickets.php(471): require_once('/var/www/html/s...')<br />

#8 {main}

Comments

  • Found part of the problem instead of

    `dept_id` IN (?, ?, ?, ?, ?)

    there should be

    `dept_id` IN (? ,? ,? ,? ,? )

    there is still a problem here I can figure out

    `ticket_id`, 0,5 AS __relevance__
  • As a reminder 1.10rc2 should not be used in a production environment.

    In your post the "instead of" appears to match the "should be" to me...

    When I run that query on my server it bombs with 'You have an error in your SQL syntax'.
  • When I run in my server and that error just moved to another position in the line so I believed it was solved... guess I could be wrong.
    Any idea what could be wrong?

  • Regarding the ticket sorting problem, any ideas how to fix it?
Sign In or Register to comment.